Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't delete slug #211

Open
t2thec opened this issue Mar 31, 2017 · 2 comments
Open

Can't delete slug #211

t2thec opened this issue Mar 31, 2017 · 2 comments

Comments

@t2thec
Copy link

t2thec commented Mar 31, 2017

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.

@fontenele
Copy link

Same problem here.

@fontenele
Copy link

fontenele commented Mar 17, 2018

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'];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants