Base table or view not found: 1146 Table 'role_user' doesn't exist
I am using spatie version 5. Whenever I assign new role using this function $user->assignRole('Admin') but I am getting an exception that
Base table or view not found: 1146 Table 'cryo_renewal.role_user' doesn't exist (Connection: mysql, SQL: delete from role_user where role_user.user_id = 1) in spatie laravel problem. What is that error can anyone explain.
https://github.com/spatie/laravel-permission/issues/1507#issuecomment-646829549 https://spatie.be/laravel-permission/prerequisites#content-must-not-have-a-role-or-roles-property
https://spatie.be/docs/laravel-permission/v6/prerequisites#content-must-not-have-a-role-or-roles-property-nor-a-roles-method
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" run this command it should work
Hello everyone!!!. I have problem with laravel permission on migrating , how you can see in the picture
I need your help friends
Hello everyone!!!. I have problem with laravel permission on migrating , how you can see in the picture !
Duplicate of #2650
Potential FIX:
If you have roles() or permissions() defined inside User remove it. It's conflicting with the HasRoles.