28 lines
544 B
PHP
28 lines
544 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Enums\User\RoleEnum;
|
|
use App\User;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class UsersTableSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
User::query()
|
|
->create([
|
|
'name' => 'admin',
|
|
'email' => 'admin@admin.com',
|
|
'password' => bcrypt(12345678),
|
|
'is_active' => 1,
|
|
])
|
|
->assignRole(RoleEnum::SUPERVISOR->value);
|
|
}
|
|
}
|