FilamentF
Filament3y ago
daar

Accessing the active record in a Relation Manager

I would like to access the record from within a Relation Manager. This works for a Resource Manager, but in this case, it seems to fail. Any suggestions?

Tables\Actions\EditAction::make()
    ->visible(
        function (ConsultNote $consultNote) {
            return $consultNote->created_by == auth()->user()->id &&
                $consultNote->created_at->diffInHours() < 24;
        }
    ),
Was this page helpful?