laravel-acl
laravel-acl copied to clipboard
Can't delete slug
trafficstars
Hi ya,
Thanks for the great package! really nice to work with.
I've noticed in \Kodeine\Acl\Models\Eloquent\Permissionthat when updating the slug, it adds any new items, but won't allow deletion.
I presume this is correct behaviour and is in place to prevent people messing things up?
Personally, I would like the ability to delete the slug. However, this is pretty trivial in the DB.
Any thoughts?
Thanks again.
Same problem here.
To update permission slugs i had to save clean slug before save my new slugs, Permissions have a SetMutator in slug attribute, so its always sync with original values stored on model.
Resolved with the code:
$permission->slug = '';
$permission->save();
$permission->slug = $post['slug'];