authentication - Only exposing certain auth routes in Laravel -
in laravel 5.2 authentication made dead simple , 1 of ways makes authentication simpler adding routes necessary authentication through 1 method, method route::auth()
.
which great, best way of exposing ones necessary login , logout actions , not registration ones, because want have 1 master login, can make other accounts admin website. don't want 'users' in normal sense.
you can add routes.php without registration route of course.
// authentication routes... //login routes... route::get('login','adminauth\authcontroller@showloginform'); route::post('login','adminauth\authcontroller@login'); route::get('logout','adminauth\authcontroller@logout'); // registration routes... route::get('register', 'auth\authcontroller@showregistrationform'); // password reset routes... route::get('password/reset/{token?}','auth\passwordcontroller@showresetform');
Comments
Post a Comment