33 lines
786 B
PHP
33 lines
786 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class UserSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$user = User::create([
|
|
'username' => 'pangestu',
|
|
'email' => 'info.pangestuyoga@gmail.com',
|
|
'password' => Hash::make('Minimal8@'),
|
|
]);
|
|
|
|
$user->profile()->create([
|
|
'nik' => '3213051307900001',
|
|
'full_name' => 'Yoga Pangestu',
|
|
'phone_number' => '082121495806',
|
|
'address' => 'Jl. Contoh No. 123',
|
|
'birth_place' => 'Jakarta',
|
|
'birth_date' => '1990-01-01',
|
|
'base_salary' => 1500000,
|
|
]);
|
|
}
|
|
}
|