dimanche 5 janvier 2020

Laravel Roles and Permission attach data store in model_has_permissions

I'm using Spatie/Laravel Permissions

When I attached permissions to the roles it stores in roles_has_permissions table, I want to store the data in model_has_permission table instead of roles_has_permissions.

$role = Role::find(1);
$role->syncPermissions([1,2]);

is there a way to do it?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Fk6CEF
via IFTTT

Aucun commentaire:

Enregistrer un commentaire