7 months ago

How to dynamically handle role permissions

Posted 7 months ago by asifmushtaq38

I have watched this video. (disappointed that he didn't added the route level permissions using middleware) I understand all the aspect, but I'm confused that how I can handle the permission dynamically? Let suppose, I have created the permission 'edit-manager' so this permission act as editing the manager. So how I can handle it dynamically? Should I edit the source code again and add this permission check as $user->can('edit-manager')? or how I can handle it? I have to edit the code each time when I create the new permission?

Please sign in or create an account to participate in this conversation.