2 years ago

First time with Laravel and following Laravel 5.4 from scratch: user can't sign in.

Posted 2 years ago by mvww11

Hello, guys!

I started with Laravel this week. I'm following the Laravel from Scratch 5.4 series.

I was getting everything right until I tryed to sign any user that I created in. The system responds as the user/pass was incorrect (It returns the proper error message). But I'm sure that the user/pass is correct because I can see it on phpmyadmin (the password is in plain text, not hashed.).


<form method="POST" action="/login">

    {{ csrf_field() }}

    <div class="form-group">

    <label for="email">Email:</label>
    <input type="email" class="form-control" id="email" name="email">


    <div class="form-group">

    <label for="password">Password:</label>
    <input type="password" class="form-control" id="password" name="password">


     <div class="form-group">
    <button type="submit" class="btn btn-primary">Sign In</button>


Route::post('/login', '[email protected]');


    public function store()
        if (! auth()->attempt(request(['email', 'password']))) {
            return back()->withErrors(['message' => 'Please check again']);
        return redirect()->home();

I would apreciate any help. Thanks!

Please sign in or create an account to participate in this conversation.