F
Filament6mo ago
CGM

Where to put custom logic shared across multiple Resource classes

Just looking for some guidance on where might be the most appropriate place to put logic that I'm looking to share across multiple Resource classes. My auth logic for some of the action buttons (to hide/show them) is getting a little long and I don't like having the same code in 8 different places. Where might be the best place to put this custom logic? Is there a 'filament way' or am I better off creating a new trait?
2 Replies
Dennis Koch
Dennis Koch6mo ago
If it’s actions only if extract those action to a new class.
CGM
CGMOP6mo ago
Thank you, thats perfect.
Want results from more Discord servers?
Add your server