重定向到外部网址在 Laravel 8 中不起作用
Redirect to external urls does not work in Laravel 8
我是 Laravel 的新手,当我尝试重定向到外部 URL 时,我得到一个空白页面。我 运行在我的本地机器上安装了 Laravel。
这是我的web.php
Route::get('/pay', function () {
return view('pay');
});
这是我尝试 运行 在 pay.blade.php
中的代码
return redirect()->away('https://www.google.com');
试试这个
redirect()->to('https://www.google.com')->send();
我是 Laravel 的新手,当我尝试重定向到外部 URL 时,我得到一个空白页面。我 运行在我的本地机器上安装了 Laravel。
这是我的web.php
Route::get('/pay', function () {
return view('pay');
});
这是我尝试 运行 在 pay.blade.php
中的代码return redirect()->away('https://www.google.com');
试试这个
redirect()->to('https://www.google.com')->send();