Estructura de base de datos, migraciones, factories y seeders
This commit is contained in:
@@ -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(),
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user