rbrecruiter/database/seeds/NewPermissions.php

26 lines
495 B
PHP
Raw Normal View History

2020-08-30 22:06:01 +00:00
<?php
use Illuminate\Database\Seeder;
class NewPermissions extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$developer = \Spatie\Permission\Models\Role::create([
'name' => 'developer'
]);
Permission::create(['name' => 'admin.settings.view']);
Permission::create(['name' => 'admin.settings.edit']);
$developer->givePermissionTo('admin.developertools.use');
}
}