28 lines
579 B
PHP
28 lines
579 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Support\Facades\Date;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
use App\Models\Region;
|
|
use App\Models\Barrio;
|
|
|
|
class BarrioSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$prueba_id = Region::create([
|
|
'name' => 'PRUEBA',
|
|
])->id;
|
|
|
|
Barrio::create([
|
|
'name'=>'PRUEBA','region_id'=>$prueba_id, 'created_at'=>Date::now()
|
|
]);
|
|
}
|
|
}
|