© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
TiBiBa

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),
->visible(fn ($record) => $record->count > 0),


But
$record
$record
always returns
null
null
. Does anyone have a solution? Thanks in advance!
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Conditional Pageblock Dependent On Resource
FilamentFFilament / ❓┊help
2y ago
Performing action on resource view event
FilamentFFilament / ❓┊help
2y ago
Add Edit action on View page
FilamentFFilament / ❓┊help
2y ago
Conditional resource on panel
FilamentFFilament / ❓┊help
2y ago