Category "laravel-permission"

Using spatie(laravel-permission) in Laravel 8

When Assigning permission for a role using seeder, in permissions table it will take guard_name as "web", but when adding permission through CRUD, it will take

How to remove all roles from the user in spatie/laravel-permission

whats the best or the usual way to remove all roles from a user? I tried $roles = $user->getRoleNames(); $user->removeRole($roles); Return value of App\Us

There is no role named `admin`. laravel

i use this package : https://github.com/spatie/laravel-permission/tree/v2 code : $user=User::find(2); $user->assignRole('admin'); and when