This commit is contained in:
rahmagustin 2026-03-12 11:52:03 +07:00
parent 64a7a9bb24
commit 3da5fe79cd
2 changed files with 23 additions and 3 deletions

View File

@ -0,0 +1,21 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
class AdminUserSeeder extends Seeder
{
public function run(): void
{
User::create([
'name' => 'Administrator',
'username' => 'admin',
'password' => Hash::make('admin123'),
'role' => 'admin',
'foto' => 'user.jpg'
]);
}
}

View File

@ -17,9 +17,8 @@ public function run(): void
{
// User::factory(10)->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
$this->call([
AdminUserSeeder::class,
]);
}
}