setiawanh
Can Custom Filter Form performs filter through joins?
I build a filament table with an aim to LEFT JOIN 2 tables: "Employees" and "Attendances". The SQL that I am trying to build is as follow:
This is the table code snippet that I have with the custom filter form:
When I checked on laravel debugbar, somehow the query log is not showing the joins when I put the joins in the "filter query". However, when I moved the joins, in the "table query", it is executing it correctly. Thus, is it possible to create joins in "filter query"?
3 replies
Custom Filament Table with Query of Left Joined Tables
I have managed to create livewire component with filament table in it as described here:
https://filamentphp.com/docs/3.x/tables/adding-a-table-to-a-livewire-component
In the example, the query for the table is given for a single model. (Product::query())
How can I pass the query for the filament table so that it will take 2 joined tables?
SELECT * FROM employees LEFT JOIN attendances ON employees.id = attendances.employee_id
15 replies
Action button in View Resource to Show Create Popup based on Relationship Manager
I have an Employee resource with work_histories in relationship manager.
I want to have an action button in the View Employee Resource which when click, will open the popup that is similar to the form for creating new work history in the relationship manager.
What should I put in the URL / function when I create Action::make() ?
Thanks!
8 replies