Filament Panel - how hide / show items based on user privileges?
Hi in my app we have 2 classes of user - internal_researcher & external_researcher. For the latter, we want to show few options in the menu (which I have done by adding into the relevant resources code similar to this)
public static function shouldRegisterNavigation(): bool { // Replace this with your condition if (auth()->user()->is_external_researcher) return true; else return false; }
public static function shouldRegisterNavigation(): bool { // Replace this with your condition if (auth()->user()->is_external_researcher) return true; else return false; }
The dashboard has some widgets and another panel and I am trying to understand / locate documentation to describe how to conditionally show these based on user some condition.