2024-03-11 19:09:03 -03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Seeders;
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Date;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
|
|
use Illuminate\Database\Seeder;
|
2024-03-12 23:56:05 -03:00
|
|
|
use App\Models\Region;
|
|
|
|
use App\Models\Barrio;
|
2024-03-14 23:14:11 -03:00
|
|
|
use App\Models\Producto;
|
|
|
|
use App\Models\Categoria;
|
2024-03-11 19:09:03 -03:00
|
|
|
|
2024-07-03 19:35:27 -03:00
|
|
|
class BonoBarrialSeeder extends Seeder
|
2024-03-11 19:09:03 -03:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the database seeds.
|
|
|
|
*/
|
|
|
|
public function run(): void
|
|
|
|
{
|
2024-03-14 23:14:11 -03:00
|
|
|
Producto::create([
|
2024-07-03 19:35:27 -03:00
|
|
|
'nombre' => 'Bono barrial',
|
|
|
|
'precio' => 20,
|
2024-03-14 23:14:11 -03:00
|
|
|
'solidario' => false,
|
|
|
|
'bono' => true,
|
2024-07-03 19:35:27 -03:00
|
|
|
'categoria_id' => Categoria::first([
|
|
|
|
'nombre' => 'TRANSPORTE, BONOS Y FINANCIAMIENTO SORORO'
|
2024-03-14 23:14:11 -03:00
|
|
|
])->id,
|
2024-07-03 19:35:27 -03:00
|
|
|
'barrio_id' => Barrio::first([
|
|
|
|
'nombre'=>'PRUEBA'
|
2024-03-14 23:14:11 -03:00
|
|
|
])->id,
|
2024-03-11 19:09:03 -03:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|