kevinwakhisi's avatar

Spatie permissions guards

Working on a SPA with API and I am using Laravel spatie permissions(https://spatie.be/docs/laravel-permission/v5/introduction), When I seeded data (the admin user) I seeding doesn't show any error but the role is not assigned to the intended user. Going on further I read about the guards but I still don't understand how to assign users without changing the guard name the only hack I found so far is to seed permissions with guard name (guard name => API), but on seeding the user is still not assigned the role yet unless I log in, and assign the admin, is there another different approach to this?

0 likes
0 replies

Please or to participate in this conversation.