Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

uxweb's avatar
Level 20

Laravel 4.3 Authentication issue

Hi everybody,

working on the dev version of Laravel 4.3 i've found some problem in the AuthController's postLogin method:

public function postLogin(LoginRequest $request)
 {
    if ($this->auth->attempt($request->only('email', 'password')))
    {
   return redirect('/');
    }

    return redirect('/login')->withErrors([
   'email' => 'The credentials you entered did not match our records. Try again?',
    ]);
 }

In case the credentials are wrong, the part where "return redirect('/login')" should be 'auth/login' as displayed by asking artisan for the route list:

auth/login/{one?}/{two?}/{three?}/{four?}/{five?} | App\Http\Controllers\Auth\AuthController@getLogin

It is just a tiny thing, just in case you have this issue, cheers.

0 likes
3 replies
xingfucoder's avatar

Hi @uxweb, did you add the Resources Routes to routes.php file when you used the artisan command php artisan make:auth?

Hope it helps you.

uxweb's avatar
Level 20

Hi, yep, i did all the authentication with artisan make:auth.

I started this conversation because i faced this problem by using the out of the box authentication.

As you all said, it is just a matter to create the /login route, but for newcomers to Laravel this may lead to a "what is happening here?" question :D.

Thank you!

2 likes

Please or to participate in this conversation.