osb/database/seeders/CountryTableSeeder.php
2021-12-20 17:24:31 +11:00

29 lines
470 B
PHP

<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\{Country,Currency};
class CountryTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$o = new Country;
$o->id = 61;
$o->name = 'Australia';
$o->two_code = 'AU';
$o->three_code = 'AUS';
$o->active = TRUE;
$oo = Currency::where('iso_code','AUD')->firstOrFail();
$oo->country()->save($o);
}
}