@@ -78,17 +78,17 @@ public function boot()
78
78
$ this ->defineRoutes ();
79
79
$ this ->configureRateLimiting ();
80
80
81
- Event::listen ('igniter.user.register ' , function (Customer $ customer , array $ data ) {
81
+ Event::listen ('igniter.user.register ' , function (Customer $ customer , array $ data ) {
82
82
Notifications \CustomerRegisteredNotification::make ()->subject ($ customer )->broadcast ();
83
83
});
84
84
85
85
$ this ->registerAdminUserPanel ();
86
86
87
- Location::extend (function ($ model ) {
87
+ Location::extend (function ($ model ) {
88
88
$ model ->relation ['morphedByMany ' ]['users ' ] = [User::class, 'name ' => 'locationable ' ];
89
89
});
90
90
91
- Template::registerHook ('endBody ' , function () {
91
+ Template::registerHook ('endBody ' , function () {
92
92
return view ('igniter.user::_partials.impersonate_banner ' );
93
93
});
94
94
}
@@ -135,7 +135,7 @@ public function registerNavigation(): array
135
135
'system ' => [
136
136
'child ' => [
137
137
'users ' => [
138
- 'priority ' => 0 ,
138
+ 'priority ' => 1 ,
139
139
'class ' => 'users ' ,
140
140
'href ' => admin_url ('users ' ),
141
141
'title ' => lang ('igniter.user::default.text_side_menu_user ' ),
@@ -148,7 +148,7 @@ public function registerNavigation(): array
148
148
149
149
public function registerSystemSettings ()
150
150
{
151
- Settings::registerCallback (function (Settings $ manager ) {
151
+ Settings::registerCallback (function (Settings $ manager ) {
152
152
$ manager ->registerSettingItems ('core ' , [
153
153
'user ' => [
154
154
'label ' => 'lang:igniter.user::default.text_tab_user ' ,
@@ -211,7 +211,7 @@ public function registerFormWidgets(): array
211
211
protected function registerEventGlobalParams ()
212
212
{
213
213
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 ) {
215
215
$ manager ->registerGlobalParams ([
216
216
'customer ' => Auth::customer (),
217
217
]);
@@ -221,8 +221,8 @@ protected function registerEventGlobalParams()
221
221
222
222
protected function registerRequestRebindHandler ()
223
223
{
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 ) {
226
226
if (!Igniter::runningInAdmin ()) {
227
227
return $ app ['admin.auth ' ]->getUser ();
228
228
}
@@ -234,7 +234,7 @@ protected function registerRequestRebindHandler()
234
234
235
235
protected function configureRateLimiting ()
236
236
{
237
- RateLimiter::for ('web ' , function (\Illuminate \Http \Request $ request ) {
237
+ RateLimiter::for ('web ' , function (\Illuminate \Http \Request $ request ) {
238
238
return Limit::perMinute (60 )->by (optional ($ request ->user ())->getKey () ?: $ request ->ip ());
239
239
});
240
240
@@ -245,7 +245,7 @@ protected function configureRateLimiting()
245
245
$ this ->app ->make (\Illuminate \Contracts \Http \Kernel::class)
246
246
->appendMiddlewareToGroup ('web ' , \Igniter \User \Http \Middleware \ThrottleRequests::class);
247
247
248
- Event::listen ('igniter.user.beforeThrottleRequest ' , function ($ request , $ params ) {
248
+ Event::listen ('igniter.user.beforeThrottleRequest ' , function ($ request , $ params ) {
249
249
$ handler = str_after ($ request ->header ('x-igniter-request-handler ' ), ':: ' );
250
250
if (in_array ($ handler , [
251
251
'onLogin ' ,
@@ -264,18 +264,18 @@ protected function configureRateLimiting()
264
264
265
265
protected function registerBladeDirectives ()
266
266
{
267
- $ this ->callAfterResolving ('blade.compiler ' , function ($ compiler , $ app ) {
267
+ $ this ->callAfterResolving ('blade.compiler ' , function ($ compiler , $ app ) {
268
268
(new BladeExtension ())->register ();
269
269
});
270
270
}
271
271
272
272
protected function registerGuards (): void
273
273
{
274
- $ this ->app ->singleton ('main.auth ' , function () {
274
+ $ this ->app ->singleton ('main.auth ' , function () {
275
275
return resolve ('auth ' )->guard (config ('igniter-auth.guards.web ' , 'web ' ));
276
276
});
277
277
278
- $ this ->app ->singleton ('admin.auth ' , function () {
278
+ $ this ->app ->singleton ('admin.auth ' , function () {
279
279
return resolve ('auth ' )->guard (config ('igniter-auth.guards.admin ' , 'web ' ));
280
280
});
281
281
}
@@ -286,7 +286,7 @@ protected function registerAdminUserPanel()
286
286
return ;
287
287
}
288
288
289
- AdminMenu::registerCallback (function (Navigation $ manager ) {
289
+ AdminMenu::registerCallback (function (Navigation $ manager ) {
290
290
$ manager ->registerMainItems ([
291
291
MainMenuItem::widget ('notifications ' , \Igniter \User \MainMenuWidgets \NotificationList::class)
292
292
->priority (15 )
@@ -320,7 +320,7 @@ protected function defineRoutes()
320
320
return ;
321
321
}
322
322
323
- Route::group ([], function ($ router ) {
323
+ Route::group ([], function ($ router ) {
324
324
(new Classes \RouteRegistrar ($ router ))->all ();
325
325
});
326
326
}
0 commit comments