How to implement hierarchical RBAC in laravel

325 Views Asked by At

I already checked the Laravel-permission by Spatie but I can not find a native way to implement the concept of parent role which inherent child role permissions. I was using such concept in Yii2 but I can not able o switch such feature to Laravel. I there is a Laravel package with able to do this I will be appreciate or if there is a way to do it manually also ok. Here is how it is implemented in Yii2 framework Yii2 autherization enter image description here

1

There are 1 best solutions below

0
On

You could define child Policies as an either-or condition of several parent Gates.

There's also Gate:before actions that seem designed with Admin privileges in mind.