在LoginController.php 我想將用戶重定向到主頁,但它在驗證用戶後總是顯示空白頁面。如何在主頁中登錄身份驗證後重定向用戶?
public function authenticater($data,$request)
{
$email=$data['email'];
$check=User::where('email', '=',$email)->first();
//if not found means we need to register the user
if ($check != null) {
// Authentication passed.....
$id=intval($check->id);
Auth::loginUsingId($id,true);
//echo '<html><script>setTimeout(function(){ window.history.go(-1); }, 3000);</script></html>';
//echo '<html><script>location.href="/";</script></html>';
return redirect()->guest(route('home'));
}