57 lines
1.7 KiB
PHP
57 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Hash;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class UserSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
DB::table('users')->insert([
|
|
[
|
|
'name' => 'Super Admin',
|
|
'email' => 'superadmin@example.com',
|
|
'password' => Hash::make('password'),
|
|
'tipe_pengguna' => 'superadmin',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'Ketua Masjid',
|
|
'email' => 'ketua@example.com',
|
|
'password' => Hash::make('password'),
|
|
'tipe_pengguna' => 'ketua',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'Bendahara Masjid',
|
|
'email' => 'bendahara@example.com',
|
|
'password' => Hash::make('password'),
|
|
'tipe_pengguna' => 'bendahara',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'Sekretaris Masjid',
|
|
'email' => 'sekretaris@example.com',
|
|
'password' => Hash::make('password'),
|
|
'tipe_pengguna' => 'sekretaris',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'Anggota Masjid',
|
|
'email' => 'anggota@example.com',
|
|
'password' => Hash::make('password'),
|
|
'tipe_pengguna' => 'anggota',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
],
|
|
]);
|
|
}
|
|
}
|