@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function register() |
| 36 | 36 | { |
| 37 | - $this->reportable(function (Throwable $e) { |
|
| 37 | + $this->reportable(function(Throwable $e) { |
|
| 38 | 38 | // |
| 39 | 39 | }); |
| 40 | 40 | } |
@@ -17,8 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function before(User $user, $method) |
| 19 | 19 | { |
| 20 | - $allowed = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) |
|
| 21 | - { |
|
| 20 | + $allowed = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) { |
|
| 22 | 21 | $q->where('description', 'Manage Users'); |
| 23 | 22 | })->first(); |
| 24 | 23 | |
@@ -17,8 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function before(User $user) |
| 19 | 19 | { |
| 20 | - $allowed = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) |
|
| 21 | - { |
|
| 20 | + $allowed = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) { |
|
| 22 | 21 | $q->where('description', 'Manage Permissions'); |
| 23 | 22 | })->first(); |
| 24 | 23 | |
@@ -24,8 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | public function adminLink(User $user) |
| 26 | 26 | { |
| 27 | - $userRole = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) |
|
| 28 | - { |
|
| 27 | + $userRole = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) { |
|
| 29 | 28 | $q->whereIsAdminLink(1); |
| 30 | 29 | })->whereAllow(1)->count(); |
| 31 | 30 | |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if(!$request->expectsJson()) { |
|
| 18 | 18 | return route('login.index'); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -14,7 +14,8 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if (! $request->expectsJson()) |
|
| 18 | + { |
|
| 18 | 19 | return route('login.index'); |
| 19 | 20 | } |
| 20 | 21 | } |
@@ -21,8 +21,8 @@ |
||
| 21 | 21 | { |
| 22 | 22 | $guards = empty($guards) ? [null] : $guards; |
| 23 | 23 | |
| 24 | - foreach ($guards as $guard) { |
|
| 25 | - if (Auth::guard($guard)->check()) { |
|
| 24 | + foreach($guards as $guard) { |
|
| 25 | + if(Auth::guard($guard)->check()) { |
|
| 26 | 26 | return redirect(RouteServiceProvider::HOME); |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -21,8 +21,10 @@ |
||
| 21 | 21 | { |
| 22 | 22 | $guards = empty($guards) ? [null] : $guards; |
| 23 | 23 | |
| 24 | - foreach ($guards as $guard) { |
|
| 25 | - if (Auth::guard($guard)->check()) { |
|
| 24 | + foreach ($guards as $guard) |
|
| 25 | + { |
|
| 26 | + if (Auth::guard($guard)->check()) |
|
| 27 | + { |
|
| 26 | 28 | return redirect(RouteServiceProvider::HOME); |
| 27 | 29 | } |
| 28 | 30 | } |
@@ -84,8 +84,7 @@ |
||
| 84 | 84 | { |
| 85 | 85 | $status = Password::reset( |
| 86 | 86 | $request->only('email', 'password', 'password_confirmation', 'token'), |
| 87 | - function($user, $password) use ($request) |
|
| 88 | - { |
|
| 87 | + function($user, $password) use ($request) { |
|
| 89 | 88 | // Determine the new expiration date |
| 90 | 89 | $expires = config('auth.passwords.settings.expire') ? Carbon::now()->addDays(config('auth.passwords.settings.expire')) : null; |
| 91 | 90 | |
@@ -72,8 +72,7 @@ |
||
| 72 | 72 | // Determine if the user has permissions for a specific area |
| 73 | 73 | protected function getPermissionValue($description) |
| 74 | 74 | { |
| 75 | - $allowed = UserRolePermissions::where('role_id', Auth::user()->role_id)->whereHas('UserRolePermissionTypes', function($q) use ($description) |
|
| 76 | - { |
|
| 75 | + $allowed = UserRolePermissions::where('role_id', Auth::user()->role_id)->whereHas('UserRolePermissionTypes', function($q) use ($description) { |
|
| 77 | 76 | $q->where('description', $description); |
| 78 | 77 | })->first(); |
| 79 | 78 | |
@@ -17,8 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function before(User $user, $method) |
| 19 | 19 | { |
| 20 | - $allowed = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) |
|
| 21 | - { |
|
| 20 | + $allowed = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) { |
|
| 22 | 21 | $q->where('description', 'Manage Equipment'); |
| 23 | 22 | })->first(); |
| 24 | 23 | |
@@ -31,11 +31,11 @@ |
||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | - * Determine whether the user can create models. |
|
| 35 | - * |
|
| 36 | - * @param \App\Models\User $user |
|
| 37 | - * @return mixed |
|
| 38 | - */ |
|
| 34 | + * Determine whether the user can create models. |
|
| 35 | + * |
|
| 36 | + * @param \App\Models\User $user |
|
| 37 | + * @return mixed |
|
| 38 | + */ |
|
| 39 | 39 | public function create(User $user) |
| 40 | 40 | { |
| 41 | 41 | return false; |