@@ -13,42 +13,38 @@ class AuthRouteMethods
1313 public function auth ()
1414 {
1515 return function ($ options = []) {
16- $ namespace = class_exists ($ this ->prependGroupNamespace ('Auth\LoginController ' )) ? null : 'App\Http\Controllers ' ;
16+ // Login Routes...
17+ if ($ options ['login ' ] ?? true ) {
18+ $ this ->get ('login ' , 'Auth\LoginController@showLoginForm ' )->name ('login ' );
19+ $ this ->post ('login ' , 'Auth\LoginController@login ' );
20+ }
21+
22+ // Logout Routes...
23+ if ($ options ['logout ' ] ?? true ) {
24+ $ this ->post ('logout ' , 'Auth\LoginController@logout ' )->name ('logout ' );
25+ }
1726
18- $ this ->group (['namespace ' => $ namespace ], function () use ($ options ) {
19- // Login Routes...
20- if ($ options ['login ' ] ?? true ) {
21- $ this ->get ('login ' , 'Auth\LoginController@showLoginForm ' )->name ('login ' );
22- $ this ->post ('login ' , 'Auth\LoginController@login ' );
23- }
27+ // Registration Routes...
28+ if ($ options ['register ' ] ?? true ) {
29+ $ this ->get ('register ' , 'Auth\RegisterController@showRegistrationForm ' )->name ('register ' );
30+ $ this ->post ('register ' , 'Auth\RegisterController@register ' );
31+ }
2432
25- // Logout Routes...
26- if ($ options ['logout ' ] ?? true ) {
27- $ this ->post ( ' logout ' , ' Auth\LoginController@logout ' )-> name ( ' logout ' );
28- }
33+ // Password Reset Routes...
34+ if ($ options ['reset ' ] ?? true ) {
35+ $ this ->resetPassword ( );
36+ }
2937
30- // Registration Routes...
31- if ($ options ['register ' ] ?? true ) {
32- $ this ->get ( ' register ' , ' Auth\RegisterController@showRegistrationForm ' )-> name ( ' register ' );
33- $ this ->post ( ' register ' , ' Auth\RegisterController@register ' );
34- }
38+ // Password Confirmation Routes...
39+ if ($ options ['confirm ' ] ??
40+ class_exists ( $ this ->prependGroupNamespace ( ' Auth\ConfirmPasswordController ' ))) {
41+ $ this ->confirmPassword ( );
42+ }
3543
36- // Password Reset Routes...
37- if ($ options ['reset ' ] ?? true ) {
38- $ this ->resetPassword ();
39- }
40-
41- // Password Confirmation Routes...
42- if ($ options ['confirm ' ] ??
43- class_exists ($ this ->prependGroupNamespace ('Auth\ConfirmPasswordController ' ))) {
44- $ this ->confirmPassword ();
45- }
46-
47- // Email Verification Routes...
48- if ($ options ['verify ' ] ?? false ) {
49- $ this ->emailVerification ();
50- }
51- });
44+ // Email Verification Routes...
45+ if ($ options ['verify ' ] ?? false ) {
46+ $ this ->emailVerification ();
47+ }
5248 };
5349 }
5450
0 commit comments