Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. public function postAuth(Request $request)
  2. {
  3. $this->validate($request, [
  4. 'email' => 'required',
  5. 'password' => 'required|max:30'
  6. ]);
  7.  
  8. if( Auth::attempt(['email' => $request->input('email'), 'password' => $request->input('password')]) )
  9. {
  10. Session::flash('success', 'You was successfully login');
  11. } else {
  12. Session::flash('error', 'Not incorecct email or password');
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement