Aknaproff/database/seeders/UsersTableSeeder.php

28 lines
544 B
PHP
Raw Normal View History

2023-09-21 12:45:08 +00:00
<?php
namespace Database\Seeders;
2023-09-21 14:01:58 +00:00
use App\Enums\User\RoleEnum;
2023-09-21 12:45:08 +00:00
use App\User;
use Illuminate\Database\Seeder;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
2023-09-21 14:01:58 +00:00
User::query()
->create([
'name' => 'admin',
'email' => 'admin@admin.com',
'password' => bcrypt(12345678),
'is_active' => 1,
])
->assignRole(RoleEnum::SUPERVISOR->value);
2023-09-21 12:45:08 +00:00
}
}