Tambah Auth Fetures

This commit is contained in:
2026-02-20 00:41:09 +08:00
parent 6ab40e6d65
commit 0d6d28e4ea
14 changed files with 3898 additions and 9 deletions

View File

@@ -15,11 +15,6 @@ class DatabaseSeeder extends Seeder
*/
public function run(): void
{
// User::factory(10)->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
$this->call(UserSeeder::class);
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
class UserSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
User::create([
'name' => 'Admin',
'employee_id' => 'ADMIN001',
'email' => 'admin@company.com',
'password' => Hash::make('admin123')
]);
}
}