todo/database/seeders/DepartmentSeeder.php

38 lines
1014 B
PHP
Raw Normal View History

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