Se comenzó a programar seeders y modelos (las migraciones ya están terminadas)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class ModalidadSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$modalidades = [
|
||||
['descripcion' => 'Presencial'],
|
||||
['descripcion' => 'Virtual'],
|
||||
];
|
||||
|
||||
foreach ($modalidades as $modalidad){
|
||||
DB::table('modalidades')->insert([
|
||||
'descripcion'=>$modalidad['descripcion'],
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user