I saw that Laravel 5.2 change the routes.php
use.
In fact, the old :
Route::controllers([
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController',
]);
don't work now.
Instead I saw it was better to use :
Route::Auth();
But this method don't provide password and register route like it use to...
Actually, I use a solution I saw on Stack Overflow, using get and post method :
// Authentication Routes...
Route::get('login', 'Auth\AuthController@showLoginForm');
[...]
// Registration Routes...
Route::get('register', 'Auth\AuthController@showRegistrationForm');
[...]
// Password Reset Routes...
Route::get('password/reset/{token?}','Auth\PasswordController@showResetForm');
[...]
It's quite awful, so is there a better usage of the 5.2 route.php file for this new Laravel version ?
Thanks for your help !
Since Laravel 5.2, the authentication system is much easier to get up and running. You can simply run this command:
php artisan make:auth
That will take care of setting up the necessary authentication resources: route definitions, views, etc. There's more info on the subject in the Laravel Documentation. You can also check out this article to see other features that are new to Laravel 5.2.
vendor/laravel/framework/src/Illuminate/Routing/Router.php
go for this file auth method, there all routes defined
May This Code Help You..
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');
Route::get('auth/confirm/{token}', 'Auth\AuthController@getConfirm');
For Password
Route::get('password/email', 'Auth\PasswordController@getEmail');
Route::post('password/email', 'Auth\PasswordController@postEmail');
Route::get('password/reset{token}','Auth\PasswordController@getReset');
Route::post('password/reset', 'Auth\PasswordController@postReset');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With