todo/database/seeders/DepartmentSeeder.php

34 lines
889 B
PHP

<?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class DepartmentSeeder extends Seeder
{
public function run(): void
{
DB::table('departments')->insert([
[
'name' => 'отдел Разработки',
'created_at' => Carbon::now(),
],
[
'name' => 'отдел Технического обеспечения',
'created_at' => Carbon::now(),
],
[
'name' => 'отдел Кадров',
'created_at' => Carbon::now(),
],
[
'name' => 'Зарплатный отдел',
'created_at' => Carbon::now(),
],
]);
}
}