public function login(Request $request)
{
$email = $request->email;
$password = $request->password;
$user = User::where('email', $email)->first();
if (! $user || ! Hash::check($password, $user->password)) {
return 'You shall not pass!';
}
return 'Ok, you can pass :)';
}
Created
February 22, 2017 17:33
-
-
Save flyingluscas/65f83935af583aa5f68e5a870ec2983d to your computer and use it in GitHub Desktop.
Simple Laravel Auth Example
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment