1
2 $remember_me = $request->has('remember') ? true : false;
3
4
5
6 if (auth()->attempt(['email' => $request->input('email'), 'password' => $request->input('password')], $remember_me))
7 {
8 $user = auth()->user();
9 Auth::login($user,true);
10 }else{
11
12 return back()->with('error','your username and password are wrong.');
13
14 }