Estructura de base de datos, migraciones, factories y seeders

This commit is contained in:
Lucho
2026-06-24 16:28:01 -03:00
parent 317d85b5c3
commit c81120f2e3
42 changed files with 1033 additions and 298 deletions
+15 -10
View File
@@ -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(),
]
);
}
}