Raffales-LMS/database/seeders/RoleSeeder.php

38 lines
687 B
PHP
Raw Permalink Normal View History

2024-04-16 09:58:24 +00:00
<?php
namespace Database\Seeders;
use App\Modules\Models\Role\Role;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class RoleSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
Role::create([
'name'=>'SuperAdmin',
'guard_name'=>'web',
]);
Role::create([
'name'=>'Consultancy',
'guard_name'=>'web',
]);
for ($i = 1; $i < 20; $i++)
DB::table('role_has_permissions')->insert([
'permission_id'=>$i,
'role_id'=>'1',
]);
}
}