File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,13 +17,9 @@ class AuthServiceProvider extends ServiceProvider
1717 public function register ()
1818 {
1919 $ this ->registerAuthenticator ();
20-
2120 $ this ->registerUserResolver ();
22-
2321 $ this ->registerAccessGate ();
24-
2522 $ this ->registerRequestRebindHandler ();
26-
2723 $ this ->registerEventRebindHandler ();
2824 }
2925
@@ -77,7 +73,7 @@ protected function registerAccessGate()
7773 }
7874
7975 /**
80- * Register a resolver for the authenticated user .
76+ * Handle the re-binding of the request binding .
8177 *
8278 * @return void
8379 */
@@ -91,15 +87,18 @@ protected function registerRequestRebindHandler()
9187 }
9288
9389 /**
94- * Register a resolver for the 'events' rebinding .
90+ * Handle the re-binding of the event dispatcher binding .
9591 *
9692 * @return void
9793 */
9894 protected function registerEventRebindHandler ()
9995 {
10096 $ this ->app ->rebinding ('events ' , function ($ app , $ dispatcher ) {
101- $ guard = $ app ['auth ' ]->guard ();
102- if (method_exists ($ guard , 'setDispatcher ' )) {
97+ if (! $ app ->resolved ('auth ' )) {
98+ return ;
99+ }
100+
101+ if (method_exists ($ guard = $ app ['auth ' ]->guard (), 'setDispatcher ' )) {
103102 $ guard ->setDispatcher ($ dispatcher );
104103 }
105104 });
You can’t perform that action at this time.
0 commit comments