71 lines
1.9 KiB
PHP
71 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class UserSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
// Akun Admin Utama
|
|
User::create([
|
|
'name' => 'admin',
|
|
'email' => 'admin@gmail.com',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'admin',
|
|
]);
|
|
|
|
User::create([
|
|
'name' => 'Jono Joni',
|
|
'email' => 'jono@gmail.com',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'employee',
|
|
]);
|
|
User::create([
|
|
'name' => 'Siti Nurhaliza',
|
|
'email' => 'siti.admin@hris.com',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'admin',
|
|
]);
|
|
|
|
// --- Akun Karyawan (Employee) ---
|
|
User::create([
|
|
'name' => 'Budi Santoso',
|
|
'email' => 'budi.santoso@hris.com',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'employee',
|
|
]);
|
|
|
|
User::create([
|
|
'name' => 'Dewi Rahayu',
|
|
'email' => 'dewi.rahayu@hris.com',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'employee',
|
|
]);
|
|
|
|
User::create([
|
|
'name' => 'Rizky Firmansyah',
|
|
'email' => 'rizky.firmansyah@hris.com',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'employee',
|
|
]);
|
|
|
|
User::create([
|
|
'name' => 'Anisa Putri',
|
|
'email' => 'anisa.putri@hris.com',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'employee',
|
|
]);
|
|
|
|
User::create([
|
|
'name' => 'Hendra Kurniawan',
|
|
'email' => 'hendra.kurniawan@hris.com',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'employee',
|
|
]);
|
|
|
|
}
|
|
} |