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(),
. It works. Is there a better or proper way to achieve it? Thanks.
Was this page helpful?