Passed
Push — master ( 21ee73...1640ca )
by Matthijs
06:07
created
app/Http/Controllers/Backend/ProductCategoryImageController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
             
27 27
             $datatables = DataTables::of($image)
28 28
 
29
-            ->addColumn('thumb', function ($image) use ($productCategoryId) {
29
+            ->addColumn('thumb', function($image) use ($productCategoryId) {
30 30
                 return '<img src="/files/product_category/100x100/'.$image->product_category_id.'/'.$image->file.'"  />';
31 31
             })
32
-            ->addColumn('action', function ($image) use ($productCategoryId) {
32
+            ->addColumn('action', function($image) use ($productCategoryId) {
33 33
                 $deleteLink = Form::deleteajax(url()->route('product-category.images.destroy', array('productCategoryId' => $productCategoryId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
34 34
                 $links = '<a href="'.url()->route('product-category.images.edit', array('productCategoryId' => $productCategoryId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
35 35
                 return $links;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function store(Request $request, $productCategoryId)
51 51
     {
52
-        $result  = ProductCategoryService::createImage($request->all(), $productCategoryId);
52
+        $result = ProductCategoryService::createImage($request->all(), $productCategoryId);
53 53
         return ProductCategoryService::notificationRedirect(array('product-category.images.index', $productCategoryId), $result, 'The category image was inserted.');
54 54
     }
55 55
 
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function update(Request $request, $productCategoryId, $productCategoryImageId)
63 63
     {
64
-        $result  = ProductCategoryService::updateImageById($request->all(), $productCategoryId, $productCategoryImageId);
64
+        $result = ProductCategoryService::updateImageById($request->all(), $productCategoryId, $productCategoryImageId);
65 65
         return ProductCategoryService::notificationRedirect(array('product-category.images.index', $productCategoryId), $result, 'The category image was updated.');
66 66
     }
67 67
 
68 68
     public function destroy($productCategoryId, $productCategoryImageId)
69 69
     {
70
-        $result  = ProductCategoryService::destroyImage($productCategoryImageId);
70
+        $result = ProductCategoryService::destroyImage($productCategoryImageId);
71 71
 
72 72
         if ($result) {
73 73
             Notification::success('The file was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ClientController.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
             $clients = ClientService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
29 29
             
30 30
             $datatables = DataTables::of($clients)
31
-            ->addColumn('last_login', function ($clients) {
31
+            ->addColumn('last_login', function($clients) {
32 32
                 return date('d F H:i', strtotime($clients->last_login));
33 33
             })
34
-            ->addColumn('action', function ($clients) {
34
+            ->addColumn('action', function($clients) {
35 35
                 $deleteLink = Form::deleteajax(url()->route('client.destroy', $clients->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
36 36
                 $links = '<a href="'.url()->route('client.edit', $clients->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a>  '.$deleteLink;
37 37
             
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
     public function postActivate(Request $request, $clientId)
69 69
     {
70 70
         $input = $request->all();
71
-        $result  = ClientService::activate($clientId);
71
+        $result = ClientService::activate($clientId);
72 72
 
73 73
         if ($input['send_mail']) {
74
-                Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) {
74
+                Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) {
75 75
                     $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.');
76 76
                 });
77 77
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
     public function store(Request $request)
93 93
     {
94
-        $result  = ClientService::create($request->all());
94
+        $result = ClientService::create($request->all());
95 95
         return ClientService::notificationRedirect('client.index', $result, 'The client was inserted.');
96 96
     }
97 97
 
@@ -122,24 +122,24 @@  discard block
 block discarded – undo
122 122
 
123 123
     public function postExport()
124 124
     {
125
-        $result  =  ClientService::selectAllExport();
126
-        Excel::create('export', function ($excel) use ($result) {
125
+        $result = ClientService::selectAllExport();
126
+        Excel::create('export', function($excel) use ($result) {
127 127
 
128
-            $excel->sheet('Clients', function ($sheet) use ($result) {
128
+            $excel->sheet('Clients', function($sheet) use ($result) {
129 129
                 $newArray = array();
130 130
                 foreach ($result as $row) {
131 131
                     $firstname = null;
132
-                    if($row->clientBillAddress) {
132
+                    if ($row->clientBillAddress) {
133 133
                         $firstname = $row->clientBillAddress->firstname;
134 134
                     }
135 135
 
136 136
                     $lastname = null;
137
-                    if($row->clientBillAddress) {
137
+                    if ($row->clientBillAddress) {
138 138
                         $lastname = $row->clientBillAddress->lastname;
139 139
                     }
140 140
 
141 141
                     $gender = null;
142
-                    if($row->clientBillAddress) {
142
+                    if ($row->clientBillAddress) {
143 143
                         $gender = $row->clientBillAddress->gender;
144 144
                     }
145 145
 
@@ -163,12 +163,12 @@  discard block
 block discarded – undo
163 163
 
164 164
     public function update(Request $request, $clientId)
165 165
     {
166
-        $result  = ClientService::updateById($request->all(), $clientId);
166
+        $result = ClientService::updateById($request->all(), $clientId);
167 167
         $input = $request->all();
168 168
         if (isset($result->id)) {
169 169
             if ($result->active) {
170 170
                 if ($input['send_mail']) {
171
-                    Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) {
171
+                    Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) {
172 172
                         $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.');
173 173
                     });
174 174
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
     public function destroy($clientId)
191 191
     {
192
-        $result  = ClientService::destroy($clientId);
192
+        $result = ClientService::destroy($clientId);
193 193
 
194 194
         if ($result) {
195 195
             Notification::success('The client was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ContentController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
             
37 37
             $datatables = DataTables::of($content)
38 38
 
39
-            ->filterColumn('title', function ($query, $keyword) {
39
+            ->filterColumn('title', function($query, $keyword) {
40 40
                 $query->whereRaw("content.title like ?", ["%{$keyword}%"]);
41 41
             })
42
-            ->addColumn('contentgroup', function ($content) {
42
+            ->addColumn('contentgroup', function($content) {
43 43
                 return $content->contenttitle;
44 44
             })
45
-            ->addColumn('action', function ($content) {
45
+            ->addColumn('action', function($content) {
46 46
                 $deleteLink = Form::deleteajax(url()->route('content.destroy', $content->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
47 47
                 $links = '<a href="'.url()->route('content.edit', $content->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
48 48
             
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function store(Request $request)
64 64
     {
65
-        $result  = ContentService::create($request->all());
65
+        $result = ContentService::create($request->all());
66 66
         return ContentService::notificationRedirect('content.index', $result, 'The content was inserted.');
67 67
     }
68 68
 
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
 
74 74
     public function update(Request $request, $contentId)
75 75
     {
76
-        $result  = ContentService::updateById($request->all(), $contentId);
76
+        $result = ContentService::updateById($request->all(), $contentId);
77 77
         return ContentService::notificationRedirect('content.index', $result, 'The content was updated.');
78 78
     }
79 79
 
80 80
     public function destroy(Request $request, $contentId)
81 81
     {
82
-        $result  = ContentService::destroy($contentId);
82
+        $result = ContentService::destroy($contentId);
83 83
 
84 84
         if ($result) {
85 85
             Notification::success('The content was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ContentGroupController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
             ->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
28 28
 
29 29
             $datatables = DataTables::of($query)
30
-            ->addColumn('action', function ($query) {
30
+            ->addColumn('action', function($query) {
31 31
                 $deleteLink = Form::deleteajax(url()->route('content-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
32 32
                 $links = '<a href="'.url()->route('content-group.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
33 33
             
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function store(Request $request)
49 49
     {
50
-        $result  = ContentService::createGroup($request->all());
50
+        $result = ContentService::createGroup($request->all());
51 51
         return ContentService::notificationRedirect('content-group.index', $result, 'The content group was inserted.');
52 52
     }
53 53
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function update(Request $request, $contentGroupId)
60 60
     {
61
-        $result  = ContentService::updateGroupById($request->all(), $contentGroupId);
61
+        $result = ContentService::updateGroupById($request->all(), $contentGroupId);
62 62
         return ContentService::notificationRedirect('content-group.index', $result, 'The content group was updated.');
63 63
     }
64 64
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function destroy($contentGroupId)
71 71
     {
72
-        $result  = ContentService::destroyGroup($contentGroupId);
72
+        $result = ContentService::destroyGroup($contentGroupId);
73 73
 
74 74
         if ($result) {
75 75
             Notification::success('The content was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductImageController.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
             $query = ProductService::getImageModel()->where('product_id', '=', $productId);
25 25
             
26 26
             $datatables = \DataTables::of($query)
27
-            ->addColumn('thumb', function ($query) use ($productId) {
27
+            ->addColumn('thumb', function($query) use ($productId) {
28 28
                 return '<img src="/files/product/100x100/'.$query->product_id.'/'.$query->file.'"  />';
29 29
             })
30 30
 
31
-            ->addColumn('action', function ($query) use ($productId) {
31
+            ->addColumn('action', function($query) use ($productId) {
32 32
                 $deleteLink = \Form::deleteajax(url()->route('product.images.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
33 33
                 $links = '<a href="'.url()->route('product.images.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
34 34
             
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function store(Request $request, $productId)
52 52
     {
53
-        $result  = ProductService::createImage($request->all(), $productId);
53
+        $result = ProductService::createImage($request->all(), $productId);
54 54
         return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was inserted.');
55 55
     }
56 56
 
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
 
65 65
         if ($productImage->relatedProductAttributes->count()) {
66 66
             foreach ($productImage->relatedProductAttributes as $row) {
67
-                $selectedProductAttributes[] =  $row->pivot->product_attribute_id;
67
+                $selectedProductAttributes[] = $row->pivot->product_attribute_id;
68 68
             }
69 69
         }
70 70
 
71 71
         if ($productImage->relatedAttributes->count()) {
72 72
             foreach ($productImage->relatedAttributes as $row) {
73
-                $selectedAttributes[] =  $row->pivot->attribute_id;
73
+                $selectedAttributes[] = $row->pivot->attribute_id;
74 74
             }
75 75
         }
76 76
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
     public function generateAttributeLists($product)
81 81
     {
82
-        $productAttributes =         $product->attributes;
82
+        $productAttributes = $product->attributes;
83 83
         $newProductAttributes = array();
84 84
         $attributesList = array();
85 85
         $productAttributesList = array();
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
 
110 110
     public function update(Request $request, $productId, $productImageId)
111 111
     {
112
-        $result  = ProductService::updateImageById($request->all(), $productId, $productImageId);
112
+        $result = ProductService::updateImageById($request->all(), $productId, $productImageId);
113 113
         return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was update.');
114 114
     }
115 115
 
116 116
     public function destroy($productId, $productImageId)
117 117
     {
118
-        $result  = ProductService::destroyImage($productImageId);
118
+        $result = ProductService::destroyImage($productImageId);
119 119
 
120 120
         if ($result) {
121 121
             Notification::success('The product image is deleted.');
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,8 +95,8 @@
 block discarded – undo
95 95
                 foreach ($newProductAttributes as $key => $productAttribute) {
96 96
                     $newArray = array();
97 97
                     foreach ($productAttribute as $keyNew => $valueNew) {
98
-                         $newArray[] = $keyNew.': '.$valueNew['value'];
99
-                         $attributesList[$valueNew['id']] = $valueNew['value'];
98
+                            $newArray[] = $keyNew.': '.$valueNew['value'];
99
+                            $attributesList[$valueNew['id']] = $valueNew['value'];
100 100
                     }
101 101
                     $productAttributesList[$key] = implode(', ', $newArray);
102 102
                 }
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductAmountSeriesController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,14 +26,14 @@  discard block
 block discarded – undo
26 26
             
27 27
             $datatables = DataTables::of($query)
28 28
 
29
-            ->addColumn('active', function ($query) {
29
+            ->addColumn('active', function($query) {
30 30
                 if ($query->active) {
31 31
                     return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-ok icon-green"></span></a>';
32 32
                 }
33 33
                 
34 34
                 return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-remove icon-red"></span></a>';
35 35
             })
36
-            ->addColumn('action', function ($query) use ($productId) {
36
+            ->addColumn('action', function($query) use ($productId) {
37 37
                 $deleteLink = Form::deleteajax(url()->route('product.product-amount-series.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
38 38
                 $links = '<a href="'.url()->route('product.product-amount-series.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
39 39
                 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function store(Request $request, $productId)
51 51
     {
52
-        $result  = ProductAmountSeriesService::create($request->all(), $productId);
52
+        $result = ProductAmountSeriesService::create($request->all(), $productId);
53 53
         return ProductService::notificationRedirect(array('product.product-amount-series.index', $productId), $result, 'The product amount series is inserted.');
54 54
     }
55 55
 
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
 
69 69
     public function update(Request $request, $productId, $id)
70 70
     {
71
-        $result  = ProductAmountSeriesService::updateById($request->all(), $productId, $id);
71
+        $result = ProductAmountSeriesService::updateById($request->all(), $productId, $id);
72 72
         return ProductService::notificationRedirect(array('product.product-amount-series.index', $productId), $result, 'The product amount series is updated.');
73 73
     }
74 74
 
75 75
     public function destroy($productId, $id)
76 76
     {
77
-        $result  = ProductAmountSeriesService::destroy($id);
77
+        $result = ProductAmountSeriesService::destroy($id);
78 78
 
79 79
         if ($result) {
80 80
             Notification::success('The product amount series is deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/SendingMethodController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         if ($request->wantsJson()) {
26 26
             $query = SendingMethodService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
27 27
 
28
-            $datatables = DataTables::of($query)->addColumn('action', function ($query) {
28
+            $datatables = DataTables::of($query)->addColumn('action', function($query) {
29 29
                 $deleteLink = Form::deleteajax(url()->route('sending-method.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $query->title);
30 30
                 $links = '<a href="'.url()->route('sending-method.country-prices.index', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Country prices ('.$query->countryPrices()->count().')</a>  <a href="/admin/sending-method/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
31 31
             
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function store(Request $request)
51 51
     {
52
-        $result  = SendingMethodService::create($request->all());
52
+        $result = SendingMethodService::create($request->all());
53 53
         return SendingMethodService::notificationRedirect('sending-method.index', $result, 'The sending method was inserted.');
54 54
     }
55 55
 
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
 
67 67
     public function update(Request $request, $sendingMethodId)
68 68
     {
69
-        $result  = SendingMethodService::updateById($request->all(), $sendingMethodId);
69
+        $result = SendingMethodService::updateById($request->all(), $sendingMethodId);
70 70
         return SendingMethodService::notificationRedirect('sending-method.index', $result, 'The sending method was updated.');
71 71
     }
72 72
 
73 73
     public function destroy($sendingMethodId)
74 74
     {
75
-        $result  = SendingMethodService::destroy($sendingMethodId);
75
+        $result = SendingMethodService::destroy($sendingMethodId);
76 76
 
77 77
         if ($result) {
78 78
             Notification::success('The sending method was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductCategoryController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
             
28 28
             $datatables = DataTables::of($productCategory)
29 29
 
30
-            ->addColumn('image', function ($productCategory) {
30
+            ->addColumn('image', function($productCategory) {
31 31
                 if ($productCategory->productCategoryImages->count()) {
32 32
                     return '<img src="/files/product_category/100x100/'.$productCategory->id.'/'.$productCategory->productCategoryImages->first()->file.'"  />';
33 33
                 }
34 34
             })
35 35
 
36
-            ->addColumn('title', function ($productCategory) {
36
+            ->addColumn('title', function($productCategory) {
37 37
 
38 38
                 $categoryTitle = $productCategory->title;
39 39
                 if ($productCategory->refProductCategory) {
@@ -47,17 +47,17 @@  discard block
 block discarded – undo
47 47
                 return $categoryTitle;
48 48
             })
49 49
 
50
-            ->addColumn('products', function ($productCategory) {
50
+            ->addColumn('products', function($productCategory) {
51 51
                 return $productCategory->products->count();
52 52
             })
53
-            ->addColumn('parent', function ($productCategory) {
53
+            ->addColumn('parent', function($productCategory) {
54 54
              
55 55
                 if ($productCategory->parent()->count()) {
56 56
                     return $productCategory->parent()->first()->title;
57 57
                 }
58 58
             })
59 59
 
60
-            ->addColumn('active', function ($product) {
60
+            ->addColumn('active', function($product) {
61 61
                 if ($product->active) {
62 62
                     return '<a href="#" class="change-active" data-url="/admin/product-category/change-active/'.$product->id.'"><span class="glyphicon glyphicon-ok icon-green"></span></a>';
63 63
                 }
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
             })
67 67
 
68 68
 
69
-            ->addColumn('seo', function ($productCategory) {
69
+            ->addColumn('seo', function($productCategory) {
70 70
                 if ($productCategory->meta_title && $productCategory->meta_description) {
71 71
                     return '<i class="fa fa-check"></i>';
72 72
                 }
73 73
             })
74
-            ->addColumn('action', function ($productCategory) {
74
+            ->addColumn('action', function($productCategory) {
75 75
                 $deleteLink = Form::deleteajax(url()->route('product-category.destroy', $productCategory->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $productCategory->title);
76 76
                 $links = '<a href="'.url()->route('product-category.edit', $productCategory->id).'" class="btn btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
77 77
             
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
     public function store(Request $request)
134 134
     {
135
-        $result  = ProductCategoryService::create($this->generateInput($request->all()));
135
+        $result = ProductCategoryService::create($this->generateInput($request->all()));
136 136
         return ProductCategoryService::notificationRedirect('product-category.index', $result, 'The product category was inserted.');
137 137
     }
138 138
 
@@ -154,13 +154,13 @@  discard block
 block discarded – undo
154 154
 
155 155
     public function update(Request $request, $productCategoryId)
156 156
     {
157
-        $result  = ProductCategoryService::updateById($this->generateInput($request->all()), $productCategoryId);
157
+        $result = ProductCategoryService::updateById($this->generateInput($request->all()), $productCategoryId);
158 158
         return ProductCategoryService::notificationRedirect('product-category.index', $result, 'The product category was updated.');
159 159
     }
160 160
 
161 161
     public function destroy($productCategoryId)
162 162
     {
163
-        $result  = ProductCategoryService::destroy($productCategoryId);
163
+        $result = ProductCategoryService::destroy($productCategoryId);
164 164
 
165 165
         if ($result) {
166 166
             Notification::success('Category was deleted.');
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             } elseif ($parent->children()->count()) {
231 231
                 $node->makeLastChildOf($parent);
232 232
                 foreach ($parent->children()->get() as $key => $row) {
233
-                    $positionKey =  $position - 1;
233
+                    $positionKey = $position - 1;
234 234
                     if ($key == $positionKey) {
235 235
                         $node->moveToRightOf($row);
236 236
                     }
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/NewsImageController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
             
27 27
             $datatables = DataTables::of($image)
28 28
 
29
-            ->addColumn('thumb', function ($image) {
29
+            ->addColumn('thumb', function($image) {
30 30
                 return '<img src="/files/news/100x100/'.$image->news_id.'/'.$image->file.'"  />';
31 31
             })
32
-            ->addColumn('action', function ($image) use ($newsId) {
32
+            ->addColumn('action', function($image) use ($newsId) {
33 33
                 $deleteLink = Form::deleteajax(url()->route('news-images.destroy', array('newsId' => $newsId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
34 34
                 $links = '<a href="'.url()->route('news-images.edit', array('newsId' => $newsId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
35 35
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function store(Request $request, $newsId)
52 52
     {
53
-        $result  = NewsService::createImage($request->all(), $newsId);
53
+        $result = NewsService::createImage($request->all(), $newsId);
54 54
         return NewsService::notificationRedirect(array('news-images.index', $newsId), $result, 'The news image was inserted.');
55 55
     }
56 56
 
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function update(Request $request, $newsId, $newsImageId)
64 64
     {
65
-        $result  = NewsService::updateImageById($request->all(), $newsId, $newsImageId);
65
+        $result = NewsService::updateImageById($request->all(), $newsId, $newsImageId);
66 66
         return NewsService::notificationRedirect(array('news-images.index', $newsId), $result, 'The news image was updated.');
67 67
     }
68 68
 
69 69
     public function destroy($newsId, $newsImageId)
70 70
     {
71
-        $result  = NewsService::destroyImage($newsImageId);
71
+        $result = NewsService::destroyImage($newsImageId);
72 72
 
73 73
         if ($result) {
74 74
             Notification::success('The file was deleted.');
Please login to merge, or discard this patch.