spatie/laravel-permission

Base table or view not found: 1146 Table 'role_user' doesn't exist

mohitbabel opened this issue · 6 comments

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.

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
spatie-permission
I need your help friends