Is there any elegant way to redirect to an external url with parameters in laravel?
I'm using this code:
$redirect = redirect(config('app.paypal.url') .'?'. http_build_query([
'charset' => 'utf-8',
'paymentaction' => 'sale',
'no_note' => 1,
...
]));
but would prefer to use something like this (it doesn't work because the route is not defined):
$redirect = redirect(route(config('app.paypal.url'), [
'charset' => 'utf-8',
'paymentaction' => 'sale',
'no_note' => 1,
...
]));