How to condition visible resource generated navigation item

how to conditionaly show or hide navigation item like Users created by UserResource for some role of users when using NavigationItems([]) how to access already navigations registered by resource ?
Solution:
Navigation items pull in the page or resources policies. so if you setup a policy that determined in the canView function that users have X or Y then they can view it will be rendered
Jump to solution
2 Replies
Solution
toeknee
toeknee17mo ago
Navigation items pull in the page or resources policies. so if you setup a policy that determined in the canView function that users have X or Y then they can view it will be rendered
toeknee
toeknee17mo ago
So essentially build standard Laravel Policies for your models 🙂

Did you find this page helpful?