@@ -26,20 +26,20 @@ |
||
| 26 | 26 | $this->prefix('profile')->name('profile.')->middleware(['administrator.password.confirm'])->group(function () { |
| 27 | 27 | // admin::auth.profile.index |
| 28 | 28 | $this->get('/', [ProfileController::class, 'index']) |
| 29 | - ->name('index'); |
|
| 29 | + ->name('index'); |
|
| 30 | 30 | |
| 31 | 31 | // Account |
| 32 | 32 | $this->prefix('account')->name('account.')->group(function () { |
| 33 | 33 | // admin::auth.profile.account.update |
| 34 | 34 | $this->put('update', [ProfileController::class, 'updateAccount']) |
| 35 | - ->name('update'); |
|
| 35 | + ->name('update'); |
|
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | 38 | // Password |
| 39 | 39 | $this->prefix('password')->name('password.')->group(function () { |
| 40 | 40 | // admin::auth.profile.password.update |
| 41 | 41 | $this->put('update', [ProfileController::class, 'updatePassword']) |
| 42 | - ->name('update'); |
|
| 42 | + ->name('update'); |
|
| 43 | 43 | }); |
| 44 | 44 | }); |
| 45 | 45 | } |
@@ -23,20 +23,20 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function map(): void |
| 25 | 25 | { |
| 26 | - $this->prefix('profile')->name('profile.')->middleware(['administrator.password.confirm'])->group(function () { |
|
| 26 | + $this->prefix('profile')->name('profile.')->middleware(['administrator.password.confirm'])->group(function() { |
|
| 27 | 27 | // admin::auth.profile.index |
| 28 | 28 | $this->get('/', [ProfileController::class, 'index']) |
| 29 | 29 | ->name('index'); |
| 30 | 30 | |
| 31 | 31 | // Account |
| 32 | - $this->prefix('account')->name('account.')->group(function () { |
|
| 32 | + $this->prefix('account')->name('account.')->group(function() { |
|
| 33 | 33 | // admin::auth.profile.account.update |
| 34 | 34 | $this->put('update', [ProfileController::class, 'updateAccount']) |
| 35 | 35 | ->name('update'); |
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | 38 | // Password |
| 39 | - $this->prefix('password')->name('password.')->group(function () { |
|
| 39 | + $this->prefix('password')->name('password.')->group(function() { |
|
| 40 | 40 | // admin::auth.profile.password.update |
| 41 | 41 | $this->put('update', [ProfileController::class, 'updatePassword']) |
| 42 | 42 | ->name('update'); |
@@ -25,6 +25,6 @@ |
||
| 25 | 25 | { |
| 26 | 26 | // admin::authorization.index |
| 27 | 27 | $this->get('/', [DashboardController::class, 'index']) |
| 28 | - ->name('index'); |
|
| 28 | + ->name('index'); |
|
| 29 | 29 | } |
| 30 | 30 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $this->prefix('{'.static::USER_WILDCARD.'}')->group(function () { |
| 38 | 38 | // admin::auth.roles.administrators.detach |
| 39 | 39 | $this->delete('detach', [AdministratorsController::class, 'detach']) |
| 40 | - ->name('detach'); |
|
| 40 | + ->name('detach'); |
|
| 41 | 41 | }); |
| 42 | 42 | }); |
| 43 | 43 | } |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function map(): void |
| 35 | 35 | { |
| 36 | - $this->prefix('administrators')->name('administrators.')->group(function () { |
|
| 37 | - $this->prefix('{'.static::USER_WILDCARD.'}')->group(function () { |
|
| 36 | + $this->prefix('administrators')->name('administrators.')->group(function() { |
|
| 37 | + $this->prefix('{'.static::USER_WILDCARD.'}')->group(function() { |
|
| 38 | 38 | // admin::auth.roles.administrators.detach |
| 39 | 39 | $this->delete('detach', [AdministratorsController::class, 'detach']) |
| 40 | 40 | ->name('detach'); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function bindings(RolesRepository $repo): void |
| 51 | 51 | { |
| 52 | - $this->bind(static::USER_WILDCARD, function (string $uuid, Route $route) use ($repo) { |
|
| 52 | + $this->bind(static::USER_WILDCARD, function(string $uuid, Route $route) use ($repo) { |
|
| 53 | 53 | /** @var \Arcanesoft\Foundation\Authorization\Models\Role $role */ |
| 54 | 54 | $role = $route->parameter(RolesRoutes::ROLE_WILDCARD); |
| 55 | 55 | |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $this->prefix('{'.static::PERMISSION_WILDCARD.'}')->group(function () { |
| 38 | 38 | // admin::auth.roles.permissions.detach |
| 39 | 39 | $this->delete('detach', [PermissionsController::class, 'detach']) |
| 40 | - ->name('detach'); |
|
| 40 | + ->name('detach'); |
|
| 41 | 41 | }); |
| 42 | 42 | }); |
| 43 | 43 | } |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function map(): void |
| 35 | 35 | { |
| 36 | - $this->prefix('permissions')->name('permissions.')->group(function () { |
|
| 37 | - $this->prefix('{'.static::PERMISSION_WILDCARD.'}')->group(function () { |
|
| 36 | + $this->prefix('permissions')->name('permissions.')->group(function() { |
|
| 37 | + $this->prefix('{'.static::PERMISSION_WILDCARD.'}')->group(function() { |
|
| 38 | 38 | // admin::auth.roles.permissions.detach |
| 39 | 39 | $this->delete('detach', [PermissionsController::class, 'detach']) |
| 40 | 40 | ->name('detach'); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function bindings(RolesRepository $repo): void |
| 51 | 51 | { |
| 52 | - $this->bind(static::PERMISSION_WILDCARD, function (string $uuid, Route $route) use ($repo) { |
|
| 52 | + $this->bind(static::PERMISSION_WILDCARD, function(string $uuid, Route $route) use ($repo) { |
|
| 53 | 53 | /** @var \Arcanesoft\Foundation\Authorization\Models\Role $role */ |
| 54 | 54 | $role = $route->parameter(RolesRoutes::ROLE_WILDCARD); |
| 55 | 55 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $this->name('sessions.')->name('prefix')->group(function () { |
| 37 | 37 | $this->prefix('{'.static::WILDCARD_SESSION.'}')->group(function () { |
| 38 | 38 | $this->delete('delete', [SessionsController::class, 'delete']) |
| 39 | - ->name('delete'); // admin::auth.administrators.sessions.delete |
|
| 39 | + ->name('delete'); // admin::auth.administrators.sessions.delete |
|
| 40 | 40 | }); |
| 41 | 41 | }); |
| 42 | 42 | } |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function map(): void |
| 35 | 35 | { |
| 36 | - $this->name('sessions.')->name('prefix')->group(function () { |
|
| 37 | - $this->prefix('{'.static::WILDCARD_SESSION.'}')->group(function () { |
|
| 36 | + $this->name('sessions.')->name('prefix')->group(function() { |
|
| 37 | + $this->prefix('{'.static::WILDCARD_SESSION.'}')->group(function() { |
|
| 38 | 38 | $this->delete('delete', [SessionsController::class, 'delete']) |
| 39 | 39 | ->name('delete'); // admin::auth.administrators.sessions.delete |
| 40 | 40 | }); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function bindings(SessionsRepository $repo): void |
| 50 | 50 | { |
| 51 | - $this->bind(static::WILDCARD_SESSION, function (string $uuid) use ($repo) { |
|
| 51 | + $this->bind(static::WILDCARD_SESSION, function(string $uuid) use ($repo) { |
|
| 52 | 52 | return $repo->firstByIdOrFail($uuid); |
| 53 | 53 | }); |
| 54 | 54 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function map(): void |
| 25 | 25 | { |
| 26 | - $this->name('password-resets.')->prefix('password-resets')->group(function () { |
|
| 26 | + $this->name('password-resets.')->prefix('password-resets')->group(function() { |
|
| 27 | 27 | // admin::authorization.password-resets.index |
| 28 | 28 | $this->get('/', [PasswordResetsController::class, 'index']) |
| 29 | 29 | ->name('index'); |
@@ -26,16 +26,16 @@ |
||
| 26 | 26 | $this->name('password-resets.')->prefix('password-resets')->group(function () { |
| 27 | 27 | // admin::authorization.password-resets.index |
| 28 | 28 | $this->get('/', [PasswordResetsController::class, 'index']) |
| 29 | - ->name('index'); |
|
| 29 | + ->name('index'); |
|
| 30 | 30 | |
| 31 | 31 | // admin::authorization.password-resets.datatable |
| 32 | 32 | $this->post('datatable', [PasswordResetsController::class, 'datatable']) |
| 33 | - ->middleware(['ajax']) |
|
| 34 | - ->name('datatable'); |
|
| 33 | + ->middleware(['ajax']) |
|
| 34 | + ->name('datatable'); |
|
| 35 | 35 | |
| 36 | 36 | // admin::authorization.password-resets.metrics |
| 37 | 37 | $this->get('metrics', [PasswordResetsController::class, 'metrics']) |
| 38 | - ->name('metrics'); |
|
| 38 | + ->name('metrics'); |
|
| 39 | 39 | }); |
| 40 | 40 | } |
| 41 | 41 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function map(): void |
| 25 | 25 | { |
| 26 | - $this->name('settings.')->prefix('settings')->group(function () { |
|
| 26 | + $this->name('settings.')->prefix('settings')->group(function() { |
|
| 27 | 27 | // admin::auth.settings.index |
| 28 | 28 | $this->get('/', [SettingsController::class, 'index']) |
| 29 | 29 | ->name('index'); |
@@ -31,8 +31,9 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function handle($request, Closure $next, $guard = null) |
| 33 | 33 | { |
| 34 | - if (Auth::guard($guard)->check()) |
|
| 35 | - Auth::guard($guard)->user()->updateLastActivity(); |
|
| 34 | + if (Auth::guard($guard)->check()) { |
|
| 35 | + Auth::guard($guard)->user()->updateLastActivity(); |
|
| 36 | + } |
|
| 36 | 37 | |
| 37 | 38 | return $next($request); |
| 38 | 39 | } |
@@ -212,7 +212,7 @@ |
||
| 212 | 212 | return $payload; |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | - return tap($payload, function (&$payload) { |
|
| 215 | + return tap($payload, function(&$payload) { |
|
| 216 | 216 | $this->addUserInformation($payload); |
| 217 | 217 | $this->addRequestInformation($payload); |
| 218 | 218 | }); |
@@ -98,8 +98,9 @@ discard block |
||
| 98 | 98 | { |
| 99 | 99 | $session = $this->findSession($sessionId); |
| 100 | 100 | |
| 101 | - if (is_null($session)) |
|
| 102 | - return ''; |
|
| 101 | + if (is_null($session)) { |
|
| 102 | + return ''; |
|
| 103 | + } |
|
| 103 | 104 | |
| 104 | 105 | if ($session->hasExpired()) { |
| 105 | 106 | $this->exists = true; |
@@ -148,8 +149,7 @@ discard block |
||
| 148 | 149 | |
| 149 | 150 | try { |
| 150 | 151 | return $this->repo->newModelInstance($attributes)->save(); |
| 151 | - } |
|
| 152 | - catch (QueryException $e) { |
|
| 152 | + } catch (QueryException $e) { |
|
| 153 | 153 | $this->performUpdate($sessionId, $attributes); |
| 154 | 154 | } |
| 155 | 155 | |