@@ -78,17 +78,17 @@ public function boot()
7878 $ this ->defineRoutes ();
7979 $ this ->configureRateLimiting ();
8080
81- Event::listen ('igniter.user.register ' , function (Customer $ customer , array $ data ) {
81+ Event::listen ('igniter.user.register ' , function (Customer $ customer , array $ data ) {
8282 Notifications \CustomerRegisteredNotification::make ()->subject ($ customer )->broadcast ();
8383 });
8484
8585 $ this ->registerAdminUserPanel ();
8686
87- Location::extend (function ($ model ) {
87+ Location::extend (function ($ model ) {
8888 $ model ->relation ['morphedByMany ' ]['users ' ] = [User::class, 'name ' => 'locationable ' ];
8989 });
9090
91- Template::registerHook ('endBody ' , function () {
91+ Template::registerHook ('endBody ' , function () {
9292 return view ('igniter.user::_partials.impersonate_banner ' );
9393 });
9494 }
@@ -135,7 +135,7 @@ public function registerNavigation(): array
135135 'system ' => [
136136 'child ' => [
137137 'users ' => [
138- 'priority ' => 0 ,
138+ 'priority ' => 1 ,
139139 'class ' => 'users ' ,
140140 'href ' => admin_url ('users ' ),
141141 'title ' => lang ('igniter.user::default.text_side_menu_user ' ),
@@ -148,7 +148,7 @@ public function registerNavigation(): array
148148
149149 public function registerSystemSettings ()
150150 {
151- Settings::registerCallback (function (Settings $ manager ) {
151+ Settings::registerCallback (function (Settings $ manager ) {
152152 $ manager ->registerSettingItems ('core ' , [
153153 'user ' => [
154154 'label ' => 'lang:igniter.user::default.text_tab_user ' ,
@@ -211,7 +211,7 @@ public function registerFormWidgets(): array
211211 protected function registerEventGlobalParams ()
212212 {
213213 if (class_exists (\Igniter \Automation \Classes \EventManager::class)) {
214- resolve (\Igniter \Automation \Classes \EventManager::class)->registerCallback (function ($ manager ) {
214+ resolve (\Igniter \Automation \Classes \EventManager::class)->registerCallback (function ($ manager ) {
215215 $ manager ->registerGlobalParams ([
216216 'customer ' => Auth::customer (),
217217 ]);
@@ -221,8 +221,8 @@ protected function registerEventGlobalParams()
221221
222222 protected function registerRequestRebindHandler ()
223223 {
224- $ this ->app ->rebinding ('request ' , function ($ app , $ request ) {
225- $ request ->setUserResolver (function () use ($ app ) {
224+ $ this ->app ->rebinding ('request ' , function ($ app , $ request ) {
225+ $ request ->setUserResolver (function () use ($ app ) {
226226 if (!Igniter::runningInAdmin ()) {
227227 return $ app ['admin.auth ' ]->getUser ();
228228 }
@@ -234,7 +234,7 @@ protected function registerRequestRebindHandler()
234234
235235 protected function configureRateLimiting ()
236236 {
237- RateLimiter::for ('web ' , function (\Illuminate \Http \Request $ request ) {
237+ RateLimiter::for ('web ' , function (\Illuminate \Http \Request $ request ) {
238238 return Limit::perMinute (60 )->by (optional ($ request ->user ())->getKey () ?: $ request ->ip ());
239239 });
240240
@@ -245,7 +245,7 @@ protected function configureRateLimiting()
245245 $ this ->app ->make (\Illuminate \Contracts \Http \Kernel::class)
246246 ->appendMiddlewareToGroup ('web ' , \Igniter \User \Http \Middleware \ThrottleRequests::class);
247247
248- Event::listen ('igniter.user.beforeThrottleRequest ' , function ($ request , $ params ) {
248+ Event::listen ('igniter.user.beforeThrottleRequest ' , function ($ request , $ params ) {
249249 $ handler = str_after ($ request ->header ('x-igniter-request-handler ' ), ':: ' );
250250 if (in_array ($ handler , [
251251 'onLogin ' ,
@@ -264,18 +264,18 @@ protected function configureRateLimiting()
264264
265265 protected function registerBladeDirectives ()
266266 {
267- $ this ->callAfterResolving ('blade.compiler ' , function ($ compiler , $ app ) {
267+ $ this ->callAfterResolving ('blade.compiler ' , function ($ compiler , $ app ) {
268268 (new BladeExtension ())->register ();
269269 });
270270 }
271271
272272 protected function registerGuards (): void
273273 {
274- $ this ->app ->singleton ('main.auth ' , function () {
274+ $ this ->app ->singleton ('main.auth ' , function () {
275275 return resolve ('auth ' )->guard (config ('igniter-auth.guards.web ' , 'web ' ));
276276 });
277277
278- $ this ->app ->singleton ('admin.auth ' , function () {
278+ $ this ->app ->singleton ('admin.auth ' , function () {
279279 return resolve ('auth ' )->guard (config ('igniter-auth.guards.admin ' , 'web ' ));
280280 });
281281 }
@@ -286,7 +286,7 @@ protected function registerAdminUserPanel()
286286 return ;
287287 }
288288
289- AdminMenu::registerCallback (function (Navigation $ manager ) {
289+ AdminMenu::registerCallback (function (Navigation $ manager ) {
290290 $ manager ->registerMainItems ([
291291 MainMenuItem::widget ('notifications ' , \Igniter \User \MainMenuWidgets \NotificationList::class)
292292 ->priority (15 )
@@ -320,7 +320,7 @@ protected function defineRoutes()
320320 return ;
321321 }
322322
323- Route::group ([], function ($ router ) {
323+ Route::group ([], function ($ router ) {
324324 (new Classes \RouteRegistrar ($ router ))->all ();
325325 });
326326 }
0 commit comments