-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Hello, I was following your tutorial from https://scotch.io/tutorials/user-authorization-in-laravel-54-with-spatie-laravel-permission. Then, I create a seed as below:
class PermissionSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
app()['cache']->forget('spatie.permission.cache');
// Project
Permission::create(['name' => 'edit projects']);
$permission = Permission::create(['name' => 'admin permissions']);
$role = Role::create(['name' => 'admin']);
$role->givePermissionTo($permission);
Role::create(['name' => 'client']);
}
}
The user has the 'admin permissions", but still return access denied!
Regards!
Metadata
Metadata
Assignees
Labels
No labels