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?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire