Support the ongoing development of Laravel.io →
Authentication Security Requests
Last updated 1 year ago.
0

Set a route.

0

Hi jimgwhit and thanks for your reply. Can you give an example of such a route in L5? I'm quite new to Laravel... Thanks again!

0

Solution for your problem :)

Route::get('/login', 'Auth\AuthController@getLogin');
Route::get('/register', 'Auth\AuthController@getRegister');
Last updated 9 years ago.
0

@stojankukrika is right.

If you are changing the login route, you should also check the "Authenticate" Middleware (line 43) and also change the route to which the user will be redirected when the session expires.

0

@stojankukrika, thanks for your example, it works but I made it a little shorter with following code:

/*
 * Authentication
 */
Route::controllers([
    'password' => 'Auth\PasswordController',
    '' => 'Auth\AuthController',
]);

Is this a good way to solve this problem?

It's kinda strange that this only works in this order though. When I put the AuthController above the PasswordController the latter no longer works, somebody knows why?

Last updated 8 years ago.
0

Because if you put it above the PasswordController, that route would catch all urls with the pattern /<anything> so /password would also enter the AuthController

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

kore245 kore245 Joined 23 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.