todo/database/seeders/DatabaseSeeder.php

38 lines
864 B
PHP

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