Closed donny26utama closed 2 years ago
maybe I post this issue in spatie/laravel-permission but in UI we need more readable permission 'users_create' more readable for user with 'Create an User', in my opinion. maybe we need some text different name to permission. and grouping name too (in the picture 'User')
Sorry, still don't understand what is the problem
I think this is a feature request, rather than show the field 'name', sometimes we need text to explain that permission. for example, I have a page to manage Customers. this page only can access by a user/role that has permission 'manage_customer' on the page to assign this permission, I think rather than use the field 'name' on the checkbox label, we can use the 'display_name' field as a label. I hope we can do like this:
<label for="{{$permission->name}}">
<input type="checkbox" name="permission[]" value="{{$permissoin->name}}"> {{$permission->display_name}}
</label>
if we use case 'manage_customer'
<label for="manage_customer">
<input type="checkbox" name="permissions[]" value="manage_customer}"> Can Manage Customer
</label>
It's a custom thing and I think you should do it yourself, because spatie/laravel-permission doesn't have field for description or some other extra data. Either by extending spatie package or doing from scratch
@donny26utama yes I understand what you're saying but then, as @krekas is saying, it's the issue for the BACK-END package to save that data, which is the Spatie package. For this package, the vision is UI, without changing the DB structure.
yeah, I understand. I just want to share something in my head when you want to make UI manage RBAC. We hope Spatie can handle this case in their way. Thanks for your comments. Nice job.
I see on your youtube video comment, someone asking about same with me. "nice_name" for non dev user.
@donny26utama what are you talkint about?