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
+11 -13
View File
@@ -13,18 +13,16 @@ class FotoSeeder extends Seeder
*/
public function run(): void
{
$fotos = [
['extension' => 'png', 'tamanio_bytes' => 136788, 'nombre' => 'default', 'mime_type' => 'image/png', 'ruta' => 'fotos/default.png'],
];
DB::table('fotos')->insert([
'extension' => $fotos[0]['extension'],
'tamanio_bytes' => $fotos[0]['tamanio_bytes'],
'nombre' => $fotos[0]['nombre'],
'mime_type' => $fotos[0]['mime_type'],
'ruta' => $fotos[0]['ruta'],
'created_at' => now(),
'updated_at' => now(),
]);
DB::table('fotos')->updateOrInsert(
['ruta' => 'images/avatar_default.png'],
[
'extension' => 'png',
'tamanio_bytes' => 136788,
'nombre' => 'avatar_default',
'mime_type' => 'image/png',
'created_at' => now(),
'updated_at' => now(),
]
);
}
}