DcatSeeder::seedGeoProjections PHP Метод

seedGeoProjections() приватный Метод

private seedGeoProjections ( )
    private function seedGeoProjections()
    {
        $this->command->info('---- Geo projections ----');
        $this->command->info('Fetching geoprojections from the local json file.');
        $geoprojections = json_decode(file_get_contents(app_path() . '/database/seeds/data/geoprojections.json'));
        if (!empty($geoprojections)) {
            $this->command->info('Geoprojections have been found, deleting the current ones, and replacing them with the new ones.');
            \Geoprojection::truncate();
            foreach ($geoprojections as $language) {
                \Geoprojection::create(array('epsg' => $language->epsg, 'projection' => $language->projection));
            }
            $this->command->info('Added the geoprojections from a local json file.');
        } else {
            $this->command->info('No languages have not been found, the old ones will not be replaced.');
        }
    }