New-OMIS/database/seeders/PermissionSeeder.php

37 lines
1.4 KiB
PHP
Raw Normal View History

2024-04-05 12:11:16 +00:00
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;
class PermissionSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$permission = Permission::create(['name' => 'create leaves']);
$permission = Permission::create(['name' => 'access leaves']);
$permission = Permission::create(['name' => 'edit leaves']);
$permission = Permission::create(['name' => 'delete leaves']);
$permission = Permission::create(['name' => 'access roles']);
$permission = Permission::create(['name' => 'edit roles']);
$permission = Permission::create(['name' => 'create roles']);
$permission = Permission::create(['name' => 'delete roles']);
$permission = Permission::create(['name' => 'access users']);
$permission = Permission::create(['name' => 'edit users']);
$permission = Permission::create(['name' => 'create users']);
$permission = Permission::create(['name' => 'delete users']);
$permission = Permission::create(['name' => 'access permissions']);
$permission = Permission::create(['name' => 'edit permissions']);
$permission = Permission::create(['name' => 'create permissions']);
$permission = Permission::create(['name' => 'delete permissions']);
}
}