41 lines
1.1 KiB
PHP
41 lines
1.1 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()
|
|
{
|
|
DB::table('users')->insert([
|
|
[
|
|
'name' => 'Admin',
|
|
'email' => 'admin@example.com',
|
|
'password' => Hash::make('password123'),
|
|
'role' => 'admin',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'Karyawan Studio',
|
|
'email' => 'user@example.com',
|
|
'password' => Hash::make('password123'),
|
|
'role' => 'user',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'Customer',
|
|
'email' => 'customer@example.com',
|
|
'password' => Hash::make('password123'),
|
|
'role' => 'customer',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
]
|
|
]);
|
|
}
|
|
}
|