Restricting Access to a Custom Filament Page Based on User Role
Hello everyone,
I'm currently working on a Filament project and have created a custom page named ApproveMaterials. I need to restrict access to this page so that only users with the 'admin' role can view it. However, I'm facing challenges in implementing this restriction.
Could anyone offer insights or guidance on the best way to restrict access to a custom Filament page based on user roles (and the make invisible the navigationLabel in the sidebar) ? Any tips or examples would be greatly appreciated!
Thank you in advance for your help.
I'm currently working on a Filament project and have created a custom page named ApproveMaterials. I need to restrict access to this page so that only users with the 'admin' role can view it. However, I'm facing challenges in implementing this restriction.
Could anyone offer insights or guidance on the best way to restrict access to a custom Filament page based on user roles (and the make invisible the navigationLabel in the sidebar) ? Any tips or examples would be greatly appreciated!
Thank you in advance for your help.