-
Notifications
You must be signed in to change notification settings - Fork 47
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
Idea: Use singular for entity permissions #12
Comments
You can actually just use whatever you want. You choose the resource type. Whether that's singular or plural, that's totally up to you. Imo it makes more sense to use plural. Edit many posts with an optional identifier for a specific post. That's why I use that example in the docs. Perhaps I should clarify better in the docs that you can use any string you want as a resource identifier? Dries Vints Lead Developer at BeatSwitch / beatswitch.com Laravel.IO Manager / laravel.io On Thu, Nov 27, 2014 at 12:28 PM, Franz Liedke notifications@github.com
|
What I meant was this: Both |
Hmm, I see what you mean. I'm not sure if I want to go there. You see, a resource type is part of the contract you define when passing resources to the Acl instance. I'd rather just handle a specific one then "guess" which one I should pick based on the input. I think it's best that you just define the type one single type and stick to that. I honestly don't see the reasoning why you should ever want 2 types for 1 resource type. |
Yeah, it's not that important. Just thought this would make it even more readable. ;) |
E.g.
->can('read', 'post', 8)
instead of->can('read', 'posts', 8)
.Or is that just overkill?
The text was updated successfully, but these errors were encountered: