Estructura de base de datos, migraciones, factories y seeders
This commit is contained in:
@@ -12,17 +12,22 @@ class BajaSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$bajas = [
|
||||
['motivo' => 'Cliente no responde'],
|
||||
['motivo' => 'Servicio cancelado'],
|
||||
];
|
||||
|
||||
foreach ($bajas as $baja) {
|
||||
DB::table('bajas')->insert([
|
||||
'motivo' => $baja['motivo'],
|
||||
DB::table('bajas')->updateOrInsert(
|
||||
['id' => 1],
|
||||
[
|
||||
'descripcion' => 'Activo',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
DB::table('bajas')->updateOrInsert(
|
||||
['id' => 2],
|
||||
[
|
||||
'descripcion' => 'Baja',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user