todo/database/seeders/DatabaseSeeder.php

38 lines
864 B
PHP
Raw Permalink Normal View History

2024-04-27 14:17:16 +03:00
<?php
namespace Database\Seeders;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
2024-05-02 16:54:51 +03:00
use Illuminate\Support\Facades\Hash;
2024-04-27 14:17:16 +03:00
class DatabaseSeeder extends Seeder
{
public function run(): void
{
$this->call([
DepartmentSeeder::class,
]);
2024-05-07 10:35:04 +03:00
User::factory(20)->create();
2024-04-27 14:17:16 +03:00
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
'department_id' => 1,
2024-05-02 16:54:51 +03:00
'password' => Hash::make('password'),
2024-04-27 14:17:16 +03:00
]);
2024-05-07 10:35:04 +03:00
$this->call([
ProjectSeeder::class,
2024-05-07 10:35:04 +03:00
LabelSeeder::class,
TaskStatusSeeder::class,
TaskSeeder::class,
NoteSeeder::class,
LabelTaskSeeder::class,
ProjectUserSeeder::class,
2024-05-07 10:35:04 +03:00
]);
2024-04-27 14:17:16 +03:00
}
}