@@ -13,42 +13,38 @@ class AuthRouteMethods
13
13
public function auth ()
14
14
{
15
15
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
+ }
17
26
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
+ }
24
32
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
+ }
29
37
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
+ }
35
43
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
+ }
52
48
};
53
49
}
54
50
0 commit comments