Reputation: 708
how can I do an external redirect (and set header values) with Lumen? This is not working:
return redirect()->away('http://www.away.com');
Upvotes: 1
Views: 8439
Reputation: 9771
Just
return redirect()->to('http://www.away.com');
or simply
return redirect('http://www.away.com');
should work.
From the source of redirect
:
* @param string|null $to
* @param int $status
* @param array $headers
* @param bool $secure
* @return \Laravel\Lumen\Http\Redirector|\Illuminate\Http\RedirectResponse
*/
function redirect($to = null, $status = 302, $headers = [], $secure = null)
Upvotes: 4