© 2026 Hedgehog Software, LLC

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

adding table filter in action->url()

On a ViewRecord page, I have an action button to open url to another resouce's ListRecord page but with a particular table filter preset. I did like the following:
Action::make('orders')
        ->url(function(Customer $record){
            return OrderResource::getUrl('index', [
                'tableFilters[customer_id][value]' => $record->id
            ]);
        })
        ->label('Your Orders')
        ->openUrlInNewTab(),
Action::make('orders')
        ->url(function(Customer $record){
            return OrderResource::getUrl('index', [
                'tableFilters[customer_id][value]' => $record->id
            ]);
        })
        ->label('Your Orders')
        ->openUrlInNewTab(),
. It works. Is there a better or proper way to achieve it? Thanks.
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

Filter Table using Action
FilamentFFilament / ❓┊help
3y ago
Table Action Url() on Column
FilamentFFilament / ❓┊help
3y ago
Filter value in action
FilamentFFilament / ❓┊help
3y ago
table in action
FilamentFFilament / ❓┊help
2y ago