hi i am building a social network with Laravel but even though i log in it always says that the password is wrong but it is correct i think the problem is in the following part of code, please show me the error?
public function getsignin()
{
return view('auth.signin');
}
public function postsignin(Request $request)
{
$this->validate($request, [
'email'=>'required',
'password'=>'required'
]);
if( !Auth::attempt($request->only(['email','password']), $request->has('remember'))) {
return redirect()->back()->with('info','Whoops! Try again please...');
}
return redirect()->route('home')->with('info','Welcome!');
}
Aucun commentaire:
Enregistrer un commentaire