37 lines
981 B
PHP
37 lines
981 B
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 UsersSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
DB::table('users')->insert([
|
|
[
|
|
'name' => 'Super Admin',
|
|
'email' => 'superadmin@gmail.com',
|
|
'password' => Hash::make('superadmin12345'), // ubah sesuai kebutuhan
|
|
'role' => 'super-admin',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'Admin',
|
|
'email' => 'admin@gmail.com',
|
|
'password' => Hash::make('admin12345'),
|
|
'role' => 'admin',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
],
|
|
]);
|
|
}
|
|
}
|