Aug 31, 2021
0
Level 3
Scope Roles to certain models using my pivot table
I need to be able to scope certain permissions to certain models and then be able to check authorization of a user based on that model. I have a pivot table called userables that stores the different models a user has joined. I would like to add a column of role . Do you have any ideas of how to extend Laravel’s authorization system and Spatie Permissions to allow me to check permissions based on the role the user has in the pivot table? Or is there a better package to use like Bouncer?
Please or to participate in this conversation.