Conditional action on view resource page

Hi! I'm trying to create conditional actions on a view resource page. Based on the value of a column. So far I tried using a condition on the visible attribute like this:

->visible(fn ($record) => $record->count > 0),


But $record always returns null. Does anyone have a solution? Thanks in advance!
Was this page helpful?