canAccess() method not working when added to Custom Page
What I am trying to do:
I was trying to use the canAccess() method to authorise certain User's access to a custom Filament page. I want it to remove the navigation menu item.
What I did:
Create a page using filament:create-page, add the canAccess method and make it always return false to test it.
My issue:
The menu item has not been removed.
I cannot see any reference to this function in the inherited classes, so a bit lost on how Filament actually uses it.
Code:
Docs link: https://filamentphp.com/docs/3.x/panels/pages#authorization
2 Replies