wotroe
Opening edit modal from a different resource (simple modal resources)
Hi, I was wondering whether it's possible to create an action in a resource to open an edit modal from a different resource.
Let's say I have two models, a Dog model and a DogOwner model. I have a resource for both of them. In an ideal scenario, I'd like to have an 'Edit Dog Owner' button in the Dog resource, preferably without using relation managers for the sake of simplicity. Is this possible?
4 replies
Hide column in relationmanager based on parent model
I've Ctrl+F'ed through the server in the hopes that I could find a solution, but unfortunately couldn't find a result that solved my issue. I'm trying to hide a column in a RelationManager if the parent record has a specific import_type, but I couldn't figure out how to pull this off since the table method is static, and the getOwnerRecord isn't. Any suggestions? Thanks in advance!
This was what I had in mind, but this unfortunately doesn't work since I can't use $this in a static function.
4 replies
Using ->having on a query when using a TernaryFilter
I'm trying to filter my Filament table using a ->having query with Filament, but the having query doesn't appear to do anything.
This is my filter:
And my table query:
The filters themselves work fine, I tested it with the following:
In that case, the 'true' option gave no results, but the bottom two did. Removing the whereRaw line from all filters makes them all return the full table. It appears that the having statement gets ignored?
I get no errors, but changing the filters doesn't do anything. Manually adding the filter to my table query does work. Does anyone know how I could fix this?
7 replies