adamj adamj - 2 months ago 5x
PHP Question

Laravel5 Redirect to external URL with params

I've gone through the following page, but I can't find any examples at all:

I've tried the following:

return redirect()->away('');

This works, but as soon as you add params to it you get the following error message


return redirect()->away('', ['bla' => 'bla']);


InvalidArgumentException in Response.php line 470:
The HTTP status code "1" is not valid.


Just add them to the string.

return redirect()->away('');

The second parameter for this function is the http status that should be sent to the visitor. So when you add an array this is parsed as a 1.