Passed
Push — dev6 ( 318218...c800c6 )
by Ron
17:51
created
app/Http/Controllers/Customers/CustomerController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         ]);
Please login to merge, or discard this patch.