@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | $totalLinks = FileLinks::where('user_id', Auth::user()->user_id)->count(); |
| 31 | 31 | |
| 32 | 32 | // Debug Data |
| 33 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 33 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 34 | 34 | Log::debug('Customer Favorites for '.Auth::user()->full_name.': ', $custFavs->toArray()); |
| 35 | - Log::debug('Tech Tip Favorites for ' . Auth::user()->full_name . ': ', $tipFavs->toArray()); |
|
| 35 | + Log::debug('Tech Tip Favorites for '.Auth::user()->full_name.': ', $tipFavs->toArray()); |
|
| 36 | 36 | |
| 37 | 37 | return view('dashboard', [ |
| 38 | 38 | 'custFavs' => $custFavs, |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | // About page |
| 48 | 48 | public function about() |
| 49 | 49 | { |
| 50 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 50 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 51 | 51 | |
| 52 | 52 | return view('about', [ |
| 53 | 53 | 'branch' => 'latest' |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function getNotifications() |
| 59 | 59 | { |
| 60 | 60 | // Debug Data |
| 61 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 61 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 62 | 62 | Log::debug('Notifications for '.Auth::user()->full_name.':', Auth::user()->notifications->toArray()); |
| 63 | 63 | |
| 64 | 64 | return Auth::user()->notifications; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | // Mark a notification as read |
| 68 | 68 | public function markNotification($id) |
| 69 | 69 | { |
| 70 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 70 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 71 | 71 | |
| 72 | 72 | $notification = Auth::user()->notifications()->where('id', $id)->where('notifiable_id', Auth::user()->user_id)->first(); |
| 73 | 73 | if(!$notification) |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | else |
| 95 | 95 | { |
| 96 | - Log::error('User ' . Auth::user()->full_name . ' tried to delete an invalid notification as read. Notification ID: ' . $id); |
|
| 96 | + Log::error('User '.Auth::user()->full_name.' tried to delete an invalid notification as read. Notification ID: '.$id); |
|
| 97 | 97 | return abort(404); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | |
| 131 | 131 | // Update the primary contact information |
| 132 | 132 | $details = Customers::find($request->cust_id); |
| 133 | - if ($details->parent_id && $request->shared == 'true') |
|
| 133 | + if($details->parent_id && $request->shared == 'true') |
|
| 134 | 134 | { |
| 135 | 135 | $request->cust_id = $details->parent_id; |
| 136 | 136 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | // Determine if the note should go to the customer, or its parent |
| 33 | 33 | $details = Customers::find($request->cust_id); |
| 34 | - if ($details->parent_id && $request->shared == 'true') |
|
| 34 | + if($details->parent_id && $request->shared == 'true') |
|
| 35 | 35 | { |
| 36 | 36 | $request->cust_id = $details->parent_id; |
| 37 | 37 | } |
@@ -56,21 +56,21 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | // Determine if there is a parent site with shared notes |
| 58 | 58 | $parent = Customers::find($id)->parent_id; |
| 59 | - if ($parent) |
|
| 59 | + if($parent) |
|
| 60 | 60 | { |
| 61 | 61 | $parentList = CustomerNotes::where('cust_id', $parent)->where('shared', 1)->orderBy('urgent', 'desc')->get(); |
| 62 | 62 | |
| 63 | 63 | $notes = $notes->merge($parentList); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 66 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 67 | 67 | return $notes; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // Update a customer note |
| 71 | 71 | public function update(Request $request, $id) |
| 72 | 72 | { |
| 73 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
| 73 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
| 74 | 74 | |
| 75 | 75 | $request->validate([ |
| 76 | 76 | 'cust_id' => 'required', |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | ]); |
| 80 | 80 | |
| 81 | 81 | $details = Customers::find($request->cust_id); |
| 82 | - if ($details->parent_id && $request->shared == 'true') |
|
| 82 | + if($details->parent_id && $request->shared == 'true') |
|
| 83 | 83 | { |
| 84 | 84 | $request->cust_id = $details->parent_id; |
| 85 | 85 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | ]); |
| 81 | 81 | |
| 82 | 82 | // Update the site timezone |
| 83 | - if (config('app.timezone') !== $request->timezone) |
|
| 83 | + if(config('app.timezone') !== $request->timezone) |
|
| 84 | 84 | { |
| 85 | 85 | Settings::firstOrCreate( |
| 86 | 86 | ['key' => 'app.timezone'], |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | )->update(['value' => $request->timezone]); |
| 89 | 89 | } |
| 90 | 90 | // Update the maximum file upload size |
| 91 | - if (config('filesystems.paths.max_size') !== $request->filesize) |
|
| 91 | + if(config('filesystems.paths.max_size') !== $request->filesize) |
|
| 92 | 92 | { |
| 93 | 93 | Settings::firstOrCreate( |
| 94 | 94 | ['key' => 'filesystems.paths.max_size'], |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | Log::notice('User '.Auth::user()->full_name.' updated User Password Policy'); |
| 90 | 90 | |
| 91 | 91 | // If the setting is changing from never to xx days, update all users |
| 92 | - if ($request->passExpire == 0) |
|
| 92 | + if($request->passExpire == 0) |
|
| 93 | 93 | { |
| 94 | 94 | User::whereNotNull('password_expires')->update([ |
| 95 | 95 | 'password_expires' => null |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | public function roleSettings() |
| 111 | 111 | { |
| 112 | 112 | $this->authorize('hasAccess', 'Manage User Roles'); |
| 113 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 113 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 114 | 114 | $roles = UserRoleType::with(['UserRolePermissions' => function($query) { |
| 115 | 115 | $query->join('user_role_permission_types', 'user_role_permission_types.perm_type_id', '=', 'user_role_permissions.perm_type_id'); |
| 116 | 116 | }])->get(); |
@@ -182,13 +182,13 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | // Good to go - get role information |
| 184 | 184 | $roleArr = []; |
| 185 | - foreach ($roles as $role) |
|
| 185 | + foreach($roles as $role) |
|
| 186 | 186 | { |
| 187 | - if ($role->role_id == 1 && Auth::user()->role_id != 1) |
|
| 187 | + if($role->role_id == 1 && Auth::user()->role_id != 1) |
|
| 188 | 188 | { |
| 189 | 189 | continue; |
| 190 | 190 | } |
| 191 | - else if ($role->role_id == 2 && Auth::user()->role_id > 1) |
|
| 191 | + else if($role->role_id == 2 && Auth::user()->role_id > 1) |
|
| 192 | 192 | { |
| 193 | 193 | continue; |
| 194 | 194 | } |
@@ -285,13 +285,13 @@ discard block |
||
| 285 | 285 | $user = User::find($request->user_id); |
| 286 | 286 | |
| 287 | 287 | // Verify this is a valid user ID |
| 288 | - if (!$user) |
|
| 288 | + if(!$user) |
|
| 289 | 289 | { |
| 290 | 290 | $success = false; |
| 291 | 291 | $reason = 'Cannot find user with this ID'; |
| 292 | 292 | } |
| 293 | 293 | // Make sure that the user is not trying to deactivate someone with more permissions |
| 294 | - else if ($user->role_id < Auth::user()->role_id) |
|
| 294 | + else if($user->role_id < Auth::user()->role_id) |
|
| 295 | 295 | { |
| 296 | 296 | $success = false; |
| 297 | 297 | $reason = 'You cannot change password for a user with higher permissions that you. If this user has locked themselves out, have then use the reset link on the login page.'; |