I'm using spatie/laravel-permissions to give permissions to roles in my app to be able to create a model in a specific location, edit a model in a specific location...
I want to add an attribute to permissions table called model_type, that represents the model for which the permission is related and create an intermediate table called location_permissions which represents the location dependent permissions which has a permission_id and a location_id, I don't want to add location_id to permissions table because it could be null for permissions that are location independent, I wanna be able to do such thing:
$role->givePermissionTo("create", Contact::class, $location)
And also be able to use the @can and other blade directives with this implementation...