34 lines
878 B
PHP
34 lines
878 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Department;
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
class DepartmentSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
DB::table('departments')->insert([
|
|
[
|
|
'name' => 'Кафедра инф. без.',
|
|
'description' => 'Кафедра инф. без. описание',
|
|
'position' => 1,
|
|
'faculty_id' => 1,
|
|
],
|
|
[
|
|
'name' => 'кафедра стоматологии',
|
|
'description' => 'кафедра стоматологии описание',
|
|
'position' => 2,
|
|
'faculty_id' => 2,
|
|
],
|
|
]);
|
|
}
|
|
}
|