1
這次我正在學習驗證。我無法爲我的登錄表單執行此操作... 我的代碼現在看起來像這樣,它僅在出現錯誤時起作用,但此代碼不想登錄我的用戶。我的代碼中應該如何工作,爲什麼現在不工作?我不知道這個驗證是如何知道哪個電子郵件和密碼應該與登錄和從哪個表進行比較?我應該在某處添加此信息嗎?Laravel驗證登錄
public function login(Request $request)
{
$this->validate($request, [
'email' => 'required|max:255|email',
'password' => 'required|confirmed',
]);
return redirect()->intended('/panel');
}