Show disabled EditAction instead of hide it to user who can't edit the record.
I've added
canEdit()
method in a BookResource
to control authorization for the EditAction
in an application built with Filament v2:
This is hiding the action completely, but I want to instead show the action disabled to users that can't edit the record.
Can someone help me with this?
->visible(fn (Model $record): bool => $record->hasAccess())
don't work.
The model's hasAccess()
method will perform this check:
0 Replies