F
Filamentβ€’15mo ago
Kuldeep

Is there a way to get the value of the filters through custom and use them in the custom query?

I've used this trick: https://v2.filamentphp.com/tricks/use-custom-view-for-table-content to display custom view and into the method getTableContent() I'm running my query to get the result. Just because I'm having multiple queries. Now from the tables filters I wanted to use those filters in my custom queries to get the result properly and display into the table. So, how can I get the value of the filters in the method getTableContent() to use them in my custom queries?
Filament
Use Custom View for Table Content by Z3d0X - Tricks - Filament
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
Solution:
getTableContent() is a method on the class right? Then you could access the Livewire component through $this->
Jump to solution
4 Replies
Dennis Koch
Dennis Kochβ€’15mo ago
Probably fn ($livewire) => $livewire->activeFilters
Kuldeep
KuldeepOPβ€’15mo ago
How we can use this into the method getTableContent()?
Solution
Dennis Koch
Dennis Kochβ€’15mo ago
getTableContent() is a method on the class right? Then you could access the Livewire component through $this->
Kuldeep
KuldeepOPβ€’15mo ago
Thank you @Dennis Koch It's done. πŸ‘
Want results from more Discord servers?
Add your server