what about a db view? You could use this view as a Model
https://stackoverflow.com/questions/26593270/how-to-access-db-views-using-laravel-models
#Joining DB tables into single Filament table
6 messages · Page 1 of 1 (latest)
Yes, I saw your comment on GitHub here https://github.com/filamentphp/filament/discussions/10228 and I actually did the same question there. The problem is that I would need one view for each date, because this table would only show records for a specific day.
The $table value would need to be something like $table = "appointments_view_<date-filter-value>", e.g.: $table = "appointments_view_2024-05-05"
Maybe every time the filter changes I truncate the view and re-add according to the filter's value?
I'm saying truncate and re-add so there's always updated data
Honestly, I don’t understand why different view names are necessary when you can use a query to filter what you need..