© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
JJSanders

Duplicate queries

Hello,

How can I get rid of duplicate queries? For example I have this query:

             ->relationship('product', 'description', function (Builder $query, Get $get) {
                    $query->where('brand_id', '=', $get('../../brand_id'));
                })
             ->relationship('product', 'description', function (Builder $query, Get $get) {
                    $query->where('brand_id', '=', $get('../../brand_id'));
                })

In reality each record has the same brand_id and this query should be executed once. However I have the feeling it gets called on each rows. Is there a way to have this only executed once?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

HasCellState duplicate queries
FilamentFFilament / ❓┊help
2y ago
How to avoid duplicate queries
FilamentFFilament / ❓┊help
2y ago
Duplicate queries in relation manager
FilamentFFilament / ❓┊help
3y ago
Duplicate queries using custom filter
FilamentFFilament / ❓┊help
3y ago