Removed redundant items, upgraded to laravel 5.6
This commit is contained in:
26
database/seeds/CountryTableSeeder.php
Normal file
26
database/seeds/CountryTableSeeder.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
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->name = 'Australia';
|
||||
$o->twocode = 'AU';
|
||||
$o->threecode = 'AUS';
|
||||
$o->currency_id = '61';
|
||||
$o->active = TRUE;
|
||||
|
||||
$oo = Currency::where('threecode','AUD')->firstOrFail();
|
||||
|
||||
$oo->countries()->save($o);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user