diff --git a/database/seeders/BarrioSeeder.php b/database/seeders/BarrioSeeder.php index 7fbc3f5..c20992d 100644 --- a/database/seeders/BarrioSeeder.php +++ b/database/seeders/BarrioSeeder.php @@ -8,6 +8,8 @@ use Illuminate\Database\Seeder; use App\Models\Region; use App\Models\Barrio; +use App\Models\Producto; +use App\Models\Categoria; class BarrioSeeder extends Seeder { @@ -16,12 +18,18 @@ class BarrioSeeder extends Seeder */ public function run(): void { - $prueba_id = Region::create([ - 'name' => 'PRUEBA', - ])->id; - - Barrio::create([ - 'name'=>'PRUEBA','region_id' => $prueba_id + Producto::create([ + 'name' => 'Bono barrial', + 'price' => 20, + 'solidario' => false, + 'bono' => true, + 'categoria_id' => Categoria::firstOrCreate([ + 'name' => 'TRANSPORTE, BONOS Y FINANCIAMIENTO SORORO' + ])->id, + 'barrio_id' => Barrio::create([ + 'name'=>'PRUEBA', + 'region_id' => Region::create(['name' => 'PRUEBA'])->id + ])->id, ]); } } diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 6ea5fea..40ec39b 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -15,9 +15,9 @@ class DatabaseSeeder extends Seeder public function run(): void { $this->call([ - BarrioSeeder::class, CaracteristicaSeeder::class, CanastaSeeder::class, + BarrioSeeder::class, ]); } }