File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 2323 $ installer ->up ();
2424 $ installer ->populate ();
2525 $ installer ->updateActions ();
26+ $ loader = new \App \Util \DataLoader ($ this ->db );
27+ if (!$ loader ->dataAlreadyLoaded ()) {
28+ $ loader ->createRegions ();
29+ $ loader ->createCountries ();
30+ $ loader ->createRegisteredCities ();
31+ }
2632 return $ response ->withJSON (['message ' => 'Success ' ]);
2733});
2834
Original file line number Diff line number Diff line change @@ -29,9 +29,11 @@ public function createCountrySpaces()
2929 // 'geometry' => $record['geojson'],
3030 // ]);
3131 $ country = $ this ->db ->query ('App:Country ' , ['space ' ])->find ($ record ['id ' ]);
32- $ space = $ country ->space ;
33- $ space ->geometry = $ record ['geojson ' ];
34- $ space ->save ();
32+ if (isset ($ country )) {
33+ $ space = $ country ->space ;
34+ $ space ->geometry = $ record ['geojson ' ];
35+ $ space ->save ();
36+ }
3537 // $country->space()->associate($space);
3638 // $country->save();
3739 // if (isset($oldSpace)) {
You can’t perform that action at this time.
0 commit comments