public function run() { DB::table('countries')->truncate(); foreach ($this->countries as $index => $country) { EloquentCountryRepository::create($country); } }
/** * Returns all active countries. * * @return \Illuminate\Database\Eloquent\Collection|static[] */ public function getCountries() { return EloquentCountryRepository::all(); }
/** * Get driver sticker price. * * @return mixed */ public function getStickerPrice() { return EloquentCountryRepository::where('iso', '=', $this->getCountry())->first()->sticker_price; }