public function update()
    {
        $this->helper->progress('--- Countries');

        $dataDir = '/countries/default/';

        $this->updater->setCountries($this->cache->remember('updateCountries->buildCountriesCoollection', 160, function () use ($dataDir) {
            $this->helper->eraseDataDir($dataDir);

            return $this->buildCountriesCoollection($dataDir);
        }));

        $this->helper->putFile(
            $this->helper->makeJsonFileName('_all_countries', $dataDir),
            $this->updater->getCountries()->toJson(JSON_PRETTY_PRINT)
        );

        $this->helper->progress('Generated '.count($this->updater->getCountries()).' countries.');

        $this->updater->setCountries(CountriesService::all());
    }
public function update()
    {
        $this->helper->progress('--- Countries');

        $dataDir = '/countries/default/';

        $this->updater->setCountries($this->cache->remember('updateCountries->buildCountriesCoollection', 160, function () use ($dataDir) {
            $this->helper->eraseDataDir($dataDir);

            return $this->buildCountriesCoollection($dataDir);
        }));

        $this->helper->putFile(
            $this->helper->makeJsonFileName('_all_countries', $dataDir),
            $this->updater->getCountries()->toJson(JSON_PRETTY_PRINT)
        );

        $this->helper->progress('Generated '.count($this->updater->getCountries()).' countries.');

        $this->updater->setCountries(CountriesService::all());
    }
public function update ( ) { $ this -> helper -> progress ( '--- Countries' ) ; $ dataDir = '/countries/default/' ; $ this -> updater -> setCountries ( $ this -> cache -> remember ( 'updateCountries->buildCountriesCoollection' , 160 , function ( ) use ( $ dataDir ) { $ this -> helper -> eraseDataDir ( $ dataDir ) ; return $ this -> buildCountriesCoollection ( $ dataDir ) ; } ) ) ; $ this -> helper -> putFile ( $ this -> helper -> makeJsonFileName ( '_all_countries' , $ dataDir ) , $ this -> updater -> getCountries ( ) -> toJson ( JSON_PRETTY_PRINT ) ) ; $ this -> helper -> progress ( 'Generated ' . count ( $ this -> updater -> getCountries ( ) ) . ' countries.' ) ; $ this -> updater -> setCountries ( CountriesService :: all ( ) ) ; }
Update countries.
Update countries .