50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class AdminUserSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
DB::table('users')->insert([
|
|
'name' => 'Admin',
|
|
'email' => 'admin@example.com',
|
|
'email_verified_at' => now(),
|
|
'password' => Hash::make('Asalada123'),
|
|
'role' => 'super_admin',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
]);
|
|
|
|
Db::table('profiles')->insert([
|
|
'user_id' => 1,
|
|
'role' => 'super_admin',
|
|
'nama' => 'Admin',
|
|
'email' => 'admin@example.com',
|
|
'telepon' => '081234567890',
|
|
'alamat' => 'Jl. Contoh Alamat No. 123, Kota Contoh',
|
|
'kk' => '1234567890123456',
|
|
'ktp' => '1234567890123456',
|
|
'desa_kelurahan_id' => null,
|
|
'path_kk' => null,
|
|
'path_ktp' => null,
|
|
'file_kk' => null,
|
|
'file_ktp' => null,
|
|
'keluarga_id' => null,
|
|
'created_by' => 1,
|
|
'updated_by' => 1,
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
'adat_id' => null,
|
|
]);
|
|
}
|
|
}
|