FilamentF
Filament15mo ago
Mepha

Allow view without view_any

So I have this user with view but without view_any in their role.

I want them to be able access
/admin/books/1


but not
/admin/books


At BookResource/Pages/ViewBook I've tried adding
public static function canAccess(array $parameters = []): bool
{
    return auth()->user()->can('view_book');
}


But no luck whatsoever
Was this page helpful?