📜  larvel 创建 MD5Hasher - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:29.352000             🧑  作者: Mango

代码示例1
Using md5() over bcrypt() is not recommended.

However you can manually authenticate user. Override login()
method in LoginController

  public function login(Request $request)
  {
     $user = User::where('username', $request->username)
                  ->where('password',md5($request->password))
                  ->first();
     Auth::login($user);
     return redirect('/');
  }