F
Filamentβ€’14mo ago
themahdavi

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
toekneeβ€’14mo 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
toekneeβ€’14mo ago
So essentially build standard Laravel Policies for your models πŸ™‚
Want results from more Discord servers?
Add your server