Laravel 5: redirect to an external link outside of localhost/server

醉酒当歌 提交于 2019-12-01 14:59:27

This code works for me:

return redirect()->away('https://www.dropbox.com');

Make sure you also add a return (i.e. return $this->checkSession();) in start().

Below code will work

return redirect()->away('http://www.paypal.com');

And this will also work.

return redirect('http://www.paypal.com');

For https and such use the following

return redirect()->to($refererUrl);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!