Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simple Laravel Auth Example
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 :)';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.