Advertisement
Guest User

log

a guest
Jun 14th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. route
  2. //login cek
  3. Route::post('/cek_log','loginController@cek_login');
  4. controller
  5.  
  6. Public function cek_login(request $request){
  7. $email = $request->email;
  8. $select = User::where('Email',$email)->first();
  9. $pass = $select->Password;
  10. $password_= $request->password;
  11.  
  12. $password = Hash::check($password_, $pass);
  13.  
  14. $check = User::where('Email',$email)->where('Password',$password)->count();
  15. if($check > 0){
  16. echo "Benar";
  17. }
  18. else{
  19. echo "Salah";
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement