@@ -27,7 +27,7 @@ |
||
| 27 | 27 | 'disk' => $status['disk'], |
| 28 | 28 | 'folder' => $status['folder'], |
| 29 | 29 | 'file_name' => $status['filename'], |
| 30 | - 'public' => filter_var($request->public, FILTER_VALIDATE_BOOL), // Force as boolean |
|
| 30 | + 'public' => filter_var($request->public, FILTER_VALIDATE_BOOL), // Force as boolean |
|
| 31 | 31 | ]); |
| 32 | 32 | |
| 33 | 33 | // Determine if other files have been uploaded by this request |
@@ -15,8 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function adminLink(User $user) |
| 17 | 17 | { |
| 18 | - $userRole = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) |
|
| 19 | - { |
|
| 18 | + $userRole = UserRolePermissions::whereRoleId($user->role_id)->whereHas('UserRolePermissionTypes', function($q) { |
|
| 20 | 19 | $q->whereIsAdminLink(1); |
| 21 | 20 | })->whereAllow(1)->count(); |
| 22 | 21 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $newCust = Customer::create($cust); |
| 61 | 61 | |
| 62 | 62 | event(new NewCustomerCreated($newCust)); |
| 63 | - return redirect(route('customers.show',$newCust->slug))->with(['message' => 'New Customer Created', 'type' => 'success']); |
|
| 63 | + return redirect(route('customers.show', $newCust->slug))->with(['message' => 'New Customer Created', 'type' => 'success']); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | ->with('ParentFile.FileUpload') |
| 91 | 91 | ->firstOrFail(); |
| 92 | 92 | // Determine if the customer is bookmarked by the user |
| 93 | - $isFav = UserCustomerBookmark::where('user_id', Auth::user()->user_id) |
|
| 93 | + $isFav = UserCustomerBookmark::where('user_id', Auth::user()->user_id) |
|
| 94 | 94 | ->where('cust_id', $customer->cust_id) |
| 95 | 95 | ->count(); |
| 96 | 96 | |
@@ -100,29 +100,29 @@ discard block |
||
| 100 | 100 | 'file_types' => CustomerFileType::all(), |
| 101 | 101 | // User Permissions for customers |
| 102 | 102 | 'user_data' => [ |
| 103 | - 'fav' => $isFav, // Customer is bookmarked by the user |
|
| 104 | - 'edit' => Auth::user()->can('update', $customer), // User is allowed to edit the customers basic details |
|
| 105 | - 'manage' => Auth::user()->can('manage', $customer), // User can recover deleted items |
|
| 106 | - 'deactivate' => Auth::user()->can('delete', $customer), // User can deactivate the customer profile |
|
| 103 | + 'fav' => $isFav, // Customer is bookmarked by the user |
|
| 104 | + 'edit' => Auth::user()->can('update', $customer), // User is allowed to edit the customers basic details |
|
| 105 | + 'manage' => Auth::user()->can('manage', $customer), // User can recover deleted items |
|
| 106 | + 'deactivate' => Auth::user()->can('delete', $customer), // User can deactivate the customer profile |
|
| 107 | 107 | 'equipment' => [ |
| 108 | - 'create' => Auth::user()->can('create', CustomerEquipment::class), // If user can add equipment |
|
| 109 | - 'update' => Auth::user()->can('update', CustomerEquipment::class), // If user can edit equipment |
|
| 110 | - 'delete' => Auth::user()->can('delete', CustomerEquipment::class), // If user can delete equipment |
|
| 108 | + 'create' => Auth::user()->can('create', CustomerEquipment::class), // If user can add equipment |
|
| 109 | + 'update' => Auth::user()->can('update', CustomerEquipment::class), // If user can edit equipment |
|
| 110 | + 'delete' => Auth::user()->can('delete', CustomerEquipment::class), // If user can delete equipment |
|
| 111 | 111 | ], |
| 112 | 112 | 'contacts' => [ |
| 113 | - 'create' => Auth::user()->can('create', CustomerContact::class), // If user can add contact |
|
| 114 | - 'update' => Auth::user()->can('update', CustomerContact::class), // If user can edit contact |
|
| 115 | - 'delete' => Auth::user()->can('delete', CustomerContact::class), // If user can delete contact |
|
| 113 | + 'create' => Auth::user()->can('create', CustomerContact::class), // If user can add contact |
|
| 114 | + 'update' => Auth::user()->can('update', CustomerContact::class), // If user can edit contact |
|
| 115 | + 'delete' => Auth::user()->can('delete', CustomerContact::class), // If user can delete contact |
|
| 116 | 116 | ], |
| 117 | 117 | 'notes' => [ |
| 118 | - 'create' => Auth::user()->can('create', CustomerNote::class), // If user can add note |
|
| 119 | - 'update' => Auth::user()->can('update', CustomerNote::class), // If user can edit note |
|
| 120 | - 'delete' => Auth::user()->can('delete', CustomerNote::class), // If user can delete note |
|
| 118 | + 'create' => Auth::user()->can('create', CustomerNote::class), // If user can add note |
|
| 119 | + 'update' => Auth::user()->can('update', CustomerNote::class), // If user can edit note |
|
| 120 | + 'delete' => Auth::user()->can('delete', CustomerNote::class), // If user can delete note |
|
| 121 | 121 | ], |
| 122 | 122 | 'files' => [ |
| 123 | - 'create' => Auth::user()->can('create', CustomerFile::class), // If user can add file |
|
| 124 | - 'update' => Auth::user()->can('update', CustomerFile::class), // If user can edit file |
|
| 125 | - 'delete' => Auth::user()->can('delete', CustomerFile::class), // If user can delete file |
|
| 123 | + 'create' => Auth::user()->can('create', CustomerFile::class), // If user can add file |
|
| 124 | + 'update' => Auth::user()->can('update', CustomerFile::class), // If user can edit file |
|
| 125 | + 'delete' => Auth::user()->can('delete', CustomerFile::class), // If user can delete file |
|
| 126 | 126 | ], |
| 127 | 127 | ], |
| 128 | 128 | ]); |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $fileType = CustomerFileType::find($id); |
| 66 | 66 | $this->authorize('delete', $fileType); |
| 67 | 67 | |
| 68 | - try{ |
|
| 68 | + try { |
|
| 69 | 69 | $fileType->delete(); |
| 70 | 70 | } |
| 71 | 71 | // The deletion may fail if the file type is currently in use |
@@ -65,7 +65,8 @@ |
||
| 65 | 65 | $fileType = CustomerFileType::find($id); |
| 66 | 66 | $this->authorize('delete', $fileType); |
| 67 | 67 | |
| 68 | - try{ |
|
| 68 | + try |
|
| 69 | + { |
|
| 69 | 70 | $fileType->delete(); |
| 70 | 71 | } |
| 71 | 72 | // The deletion may fail if the file type is currently in use |
@@ -19,8 +19,7 @@ |
||
| 19 | 19 | if($event->notify) |
| 20 | 20 | { |
| 21 | 21 | $notificationType = UserSettingType::where('name', 'Receive Email Notifications')->first(); |
| 22 | - $userList = User::whereHas('UserSetting', function($q) use ($notificationType) |
|
| 23 | - { |
|
| 22 | + $userList = User::whereHas('UserSetting', function($q) use ($notificationType) { |
|
| 24 | 23 | $q->where('setting_type_id', $notificationType->setting_type_id)->where('value', true); |
| 25 | 24 | })->get(); |
| 26 | 25 | |
@@ -38,8 +38,7 @@ |
||
| 38 | 38 | if(isset($equip['laravel_through_key'])) |
| 39 | 39 | { |
| 40 | 40 | // Remove that piece from the current equipment list so it is not updated later |
| 41 | - $current = $current->filter(function($i) use ($equip) |
|
| 42 | - { |
|
| 41 | + $current = $current->filter(function($i) use ($equip) { |
|
| 43 | 42 | return $i->equip_id != $equip['equip_id']; |
| 44 | 43 | }); |
| 45 | 44 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | if($field !== null) |
| 18 | 18 | { |
| 19 | 19 | // Determine if this is a new or existing field type |
| 20 | - $fieldID = DataFieldType::where('name', $field)->first(); |
|
| 20 | + $fieldID = DataFieldType::where('name', $field)->first(); |
|
| 21 | 21 | if(!$fieldID) |
| 22 | 22 | { |
| 23 | 23 | $fieldID = DataFieldType::create(['name' => $field]); |
@@ -17,9 +17,9 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function __invoke(SettingsRequest $request) |
| 19 | 19 | { |
| 20 | - $this->saveSettings('app.timezone', $request->timezone); |
|
| 20 | + $this->saveSettings('app.timezone', $request->timezone); |
|
| 21 | 21 | $this->saveSettings('filesystems.max_filesize', $request->filesize); |
| 22 | - $this->saveSettings('app.url', $request->url); |
|
| 22 | + $this->saveSettings('app.url', $request->url); |
|
| 23 | 23 | |
| 24 | 24 | event(new GlobalConfigUpdatedEvent($request)); |
| 25 | 25 | return back()->with([ |