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