Jonas
Duplicate navigationbadge query with multitenancy
Hey,
I'm using getNavigationFeature() in a FilamentPHP multitenancy app, like this:
While investigating with Laravel Debugbar, I noticed that the query runs for every tenant the user has access to, which seems unnecessary.
For example, if I, as a user, have access to 10 customers, each page load runs 10 queries to get the navigation badge for each customer—even though only the active tenant is displayed and needed. I also noticed that it queries navigation badges for another panel on each page load, leading to even more unnecessary queries.
Is there a way to ensure it only runs the query for the selected tenant and only within the same panel or is it a config issue on my end?
5 replies
Defining record in Table EditAction not working
Hi
I am having an issue with the table EditAction when using another model than what the table record has.
My setup has a task model and then a taskAnswer model (witch belongs to the task).
My issue is that even though i define EditRecord to edit the taskanswer, it tries to update the task instead.
(I have removed alot of irrelevant code in below snippets)
Edit Action
This tries to update the task, and not the task answer - even though i have defined both model and record.
Im kinda stuck here..
I have a similiar approach to create record, and that works fine.
2 replies
Using table builder with an external API
Hi.
I have been following the guide here: https://filamentphp.com/community/how-to-consume-an-external-api-with-filament-tables
This works good an all, however here is my problem:
- I need to define query paramaters on the actual API, not the model (so in order to first populate the model, i need to define variables when polling the API). How would i approach something like this?
3 replies