Passed
Push — master ( 83607a...fdbeea )
by Matthijs
23:31 queued 16:51
created
app/Http/Controllers/Backend/OrderController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -259,9 +259,9 @@
 block discarded – undo
259 259
     {
260 260
         $order = OrderService::find($orderId);
261 261
         if($order->orderLabel()->count()) {
262
-          header("Content-type: application/octet-stream");
263
-          header("Content-disposition: attachment;filename=label.pdf");
264
-          echo $order->orderLabel->data;
262
+            header("Content-type: application/octet-stream");
263
+            header("Content-disposition: attachment;filename=label.pdf");
264
+            echo $order->orderLabel->data;
265 265
         }
266 266
     }
267 267
 
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 use Hideyo\Ecommerce\Framework\Services\Order\OrderFacade as OrderService;
15 15
 use Hideyo\Ecommerce\Framework\Services\Order\OrderStatusFacade as OrderStatusService;
16 16
 use Hideyo\Ecommerce\Framework\Services\PaymentMethod\PaymentMethodFacade as PaymentMethodService;
17
-use Hideyo\Ecommerce\Framework\Services\SendingMethod\SendingMethodFacade as SendingMethodService;use Hideyo\Ecommerce\Framework\Services\Product\ProductFacade as ProductService;
17
+use Hideyo\Ecommerce\Framework\Services\SendingMethod\SendingMethodFacade as SendingMethodService; use Hideyo\Ecommerce\Framework\Services\Product\ProductFacade as ProductService;
18 18
 
19 19
 use Carbon\Carbon;
20 20
 use Request;
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 {
29 29
     public function index()
30 30
     {
31
-        $shop  = auth('hideyobackend')->user()->shop;
31
+        $shop = auth('hideyobackend')->user()->shop;
32 32
         $now = Carbon::now();
33 33
 
34 34
         $revenueThisMonth = null;
@@ -58,15 +58,15 @@  discard block
 block discarded – undo
58 58
             
59 59
             $datatables = \Datatables::of($order)
60 60
 
61
-            ->addColumn('generated_custom_order_id', function ($order) {
61
+            ->addColumn('generated_custom_order_id', function($order) {
62 62
                 return $order->generated_custom_order_id;
63 63
             })
64 64
 
65
-            ->addColumn('created_at', function ($order) {
65
+            ->addColumn('created_at', function($order) {
66 66
                 return date('d F H:i', strtotime($order->created_at));
67 67
             })
68 68
 
69
-            ->addColumn('status', function ($order) {
69
+            ->addColumn('status', function($order) {
70 70
                 if ($order->orderStatus) {
71 71
                     if ($order->orderStatus->color) {
72 72
                         return '<a href="/admin/order/'.$order->id.'" style="text-decoration:none;"><span style="background-color:'.$order->orderStatus->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$order->orderStatus->title.'</span></a>';
@@ -75,46 +75,46 @@  discard block
 block discarded – undo
75 75
                 }
76 76
             })
77 77
 
78
-            ->filterColumn('client', function ($query, $keyword) {
78
+            ->filterColumn('client', function($query, $keyword) {
79 79
 
80 80
                 $query->where(
81
-                    function ($query) use ($keyword) {
81
+                    function($query) use ($keyword) {
82 82
                         $query->whereRaw("order_address.firstname like ?", ["%{$keyword}%"]);
83 83
                         $query->orWhereRaw("order_address.lastname like ?", ["%{$keyword}%"]);
84 84
                         ;
85 85
                     }
86 86
                 );
87 87
             })
88
-            ->addColumn('client', function ($order) {
88
+            ->addColumn('client', function($order) {
89 89
                 if ($order->client) {
90 90
                     if ($order->orderBillAddress) {
91
-                        return '<a href="/admin/client/'.$order->client_id.'/order">'.$order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname.' ('.$order->client->orders->count() .')</a>';
91
+                        return '<a href="/admin/client/'.$order->client_id.'/order">'.$order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname.' ('.$order->client->orders->count().')</a>';
92 92
                     }
93 93
                 }
94 94
             })
95
-            ->addColumn('products', function ($order) {
95
+            ->addColumn('products', function($order) {
96 96
                 if ($order->products) {
97 97
                     return $order->products->count();
98 98
                 }
99 99
             })
100
-            ->addColumn('price_with_tax', function ($order) {
100
+            ->addColumn('price_with_tax', function($order) {
101 101
                 $money = '&euro; '.$order->getPriceWithTaxNumberFormat();
102 102
                 return $money;
103 103
             })
104 104
 
105 105
 
106
-            ->addColumn('paymentMethod', function ($order) {
106
+            ->addColumn('paymentMethod', function($order) {
107 107
                 if ($order->orderPaymentMethod) {
108 108
                     return $order->orderPaymentMethod->title;
109 109
                 }
110 110
             })
111
-            ->addColumn('sendingMethod', function ($order) {
111
+            ->addColumn('sendingMethod', function($order) {
112 112
                 if ($order->orderSendingMethod) {
113 113
                     return $order->orderSendingMethod->title;
114 114
                 }
115 115
             })
116
-            ->addColumn('action', function ($order) {
117
-                $deleteLink = \Form::deleteajax('/admin/order/'. $order->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
116
+            ->addColumn('action', function($order) {
117
+                $deleteLink = \Form::deleteajax('/admin/order/'.$order->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
118 118
                 $download = '<a href="/admin/order/'.$order->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a>  ';
119 119
             
120 120
        
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
         if ($data and $data['order']) {
149 149
 
150
-            if($data['type'] == 'one-pdf') {
150
+            if ($data['type'] == 'one-pdf') {
151 151
                 $pdfHtml = "";
152 152
                 $countOrders = count($data['order']);
153 153
                 $i = 0;
@@ -173,15 +173,15 @@  discard block
 block discarded – undo
173 173
                 $pdf = PDF::loadHTML($pdfHtmlBody);
174 174
 
175 175
                 return $pdf->download('order-'.$order->generated_custom_order_id.'.pdf');
176
-            } elseif($data['type'] == 'product-list') {
176
+            } elseif ($data['type'] == 'product-list') {
177 177
                 $products = OrderService::productsByOrderIds($data['order']);
178 178
 
179
-                if($products) {
179
+                if ($products) {
180 180
 
181 181
 
182
-                    Excel::create('products', function ($excel) use ($products) {
182
+                    Excel::create('products', function($excel) use ($products) {
183 183
 
184
-                        $excel->sheet('Products', function ($sheet) use ($products) {
184
+                        $excel->sheet('Products', function($sheet) use ($products) {
185 185
                             $newArray = array();
186 186
                             foreach ($products as $key => $row) {
187 187
                 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
         if ($orders) {
214 214
             Request::session()->put('print_orders', $orders->toArray());
215
-            return response()->json(array('orders' => $orders->toArray() ));
215
+            return response()->json(array('orders' => $orders->toArray()));
216 216
         }
217 217
 
218 218
         Request::session()->destroy('print_orders');
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     public function downloadLabel($orderId)
256 256
     {
257 257
         $order = OrderService::find($orderId);
258
-        if($order->orderLabel()->count()) {
258
+        if ($order->orderLabel()->count()) {
259 259
           header("Content-type: application/octet-stream");
260 260
           header("Content-disposition: attachment;filename=label.pdf");
261 261
           echo $order->orderLabel->data;
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 
288 288
         );
289 289
         foreach ($replace as $key => $val) {
290
-            $content = str_replace("[" . $key . "]", $val, $content);
290
+            $content = str_replace("[".$key."]", $val, $content);
291 291
         }
292 292
 
293 293
         return $content;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
     public function update($orderId)
302 302
     {
303
-        $result  = OrderService::updateById(Request::all(), $orderId);
303
+        $result = OrderService::updateById(Request::all(), $orderId);
304 304
 
305 305
         if ($result->errors()->all()) {
306 306
             return redirect()->back()->withInput()->withErrors($result->errors()->all());
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
                     function ($query) use ($keyword) {
69 69
                         $query->whereRaw("product.title like ?", ["%{$keyword}%"]);
70 70
                         $query->orWhereRaw("product.reference_code like ?", ["%{$keyword}%"]);
71
-                             $query->orWhereRaw("brand.title like ?", ["%{$keyword}%"]);
71
+                                $query->orWhereRaw("brand.title like ?", ["%{$keyword}%"]);
72 72
                         ;
73 73
                     }
74 74
                 );
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                 ['product.*', 
34 34
                 'brand.title as brandtitle', 
35 35
                 'product_category.title as categorytitle']
36
-            )->with(array('productCategory', 'brand', 'subcategories', 'attributes',  'productImages','taxRate'))
36
+            )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages', 'taxRate'))
37 37
 
38 38
             ->leftJoin('product_category as product_category', 'product_category.id', '=', 'product.product_category_id')
39 39
 
@@ -42,23 +42,23 @@  discard block
 block discarded – undo
42 42
             ->where('product.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
43 43
             
44 44
             $datatables = \Datatables::of($product)
45
-            ->filterColumn('reference_code', function ($query, $keyword) {
45
+            ->filterColumn('reference_code', function($query, $keyword) {
46 46
                 $query->whereRaw("product.reference_code like ?", ["%{$keyword}%"]);
47 47
             })
48
-            ->filterColumn('active', function ($query, $keyword) {
48
+            ->filterColumn('active', function($query, $keyword) {
49 49
                 $query->whereRaw("product.active like ?", ["%{$keyword}%"]);
50 50
                 ;
51 51
             })
52 52
 
53
-            ->addColumn('rank', function ($product) {
53
+            ->addColumn('rank', function($product) {
54 54
                 return '<input type="text" class="change-rank" value="'.$product->rank.'" style="width:50px;" data-url="/admin/product/change-rank/'.$product->id.'">';
55 55
               
56 56
             })
57 57
 
58
-            ->filterColumn('title', function ($query, $keyword) {
58
+            ->filterColumn('title', function($query, $keyword) {
59 59
 
60 60
                 $query->where(
61
-                    function ($query) use ($keyword) {
61
+                    function($query) use ($keyword) {
62 62
                         $query->whereRaw("product.title like ?", ["%{$keyword}%"]);
63 63
                         $query->orWhereRaw("product.reference_code like ?", ["%{$keyword}%"]);
64 64
                              $query->orWhereRaw("brand.title like ?", ["%{$keyword}%"]);
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
                 );
68 68
             })
69 69
 
70
-            ->filterColumn('categorytitle', function ($query, $keyword) {
70
+            ->filterColumn('categorytitle', function($query, $keyword) {
71 71
                 $query->whereRaw("product_category.title like ?", ["%{$keyword}%"]);
72 72
             })
73 73
 
74
-            ->addColumn('active', function ($product) {
74
+            ->addColumn('active', function($product) {
75 75
                 if ($product->active) {
76 76
                     return '<a href="#" class="change-active" data-url="'.url()->route('product.change-active', array('productId' => $product->id)).'"><span class="glyphicon glyphicon-ok icon-green"></span></a>';
77 77
                 }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 return '<a href="#" class="change-active" data-url="'.url()->route('product.change-active', array('productId' => $product->id)).'"><span class="glyphicon glyphicon-remove icon-red"></span></a>';
80 80
             })
81 81
 
82
-            ->addColumn('title', function ($product) {
82
+            ->addColumn('title', function($product) {
83 83
                 if ($product->brand) {
84 84
                     return $product->brand->title.' | '.$product->title;
85 85
                 }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             })
89 89
 
90 90
 
91
-            ->addColumn('amount', function ($product) {
91
+            ->addColumn('amount', function($product) {
92 92
                 if ($product->attributes->count()) {
93 93
                     return '<a href="/admin/product/'.$product->id.'/product-combination">combinations</a>';
94 94
                 }
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
                 return '<input type="text" class="change-amount" value="'.$product->amount.'" style="width:50px;" data-url="'.url()->route('product.change-amount', array('productId' => $product->id)).'">';
97 97
             })
98 98
 
99
-            ->addColumn('image', function ($product) {
99
+            ->addColumn('image', function($product) {
100 100
                 if ($product->productImages->count()) {
101 101
                     return '<img src="/files/product/100x100/'.$product->id.'/'.$product->productImages->first()->file.'"  />';
102 102
                 }
103 103
             })
104
-            ->addColumn('price', function ($product) {
104
+            ->addColumn('price', function($product) {
105 105
 
106 106
                 $result = "";
107 107
                 if ($product->price) {
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                         'amount' => $product->amount
152 152
                         );
153 153
 
154
-                    $result =  '&euro; '.$output['orginal_price_ex_tax_number_format'].' / &euro; '.$output['orginal_price_inc_tax_number_format'];
154
+                    $result = '&euro; '.$output['orginal_price_ex_tax_number_format'].' / &euro; '.$output['orginal_price_inc_tax_number_format'];
155 155
 
156 156
 
157 157
                     if ($product->discount_value) {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             })
164 164
 
165 165
 
166
-            ->addColumn('categorytitle', function ($product) {
166
+            ->addColumn('categorytitle', function($product) {
167 167
                 if ($product->subcategories()->count()) {
168 168
                     $subcategories = $product->subcategories()->pluck('title')->toArray();
169 169
                     return $product->categorytitle.', <small> '.implode(', ', $subcategories).'</small>';
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                 return $product->categorytitle;
173 173
             })
174 174
 
175
-            ->addColumn('action', function ($product) {
175
+            ->addColumn('action', function($product) {
176 176
                 $deleteLink = \Form::deleteajax(url()->route('product.destroy', $product->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'), $product->title);
177 177
                 $copy = '<a href="'.url()->route('product.copy', $product->id).'" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Copy</a>';
178 178
 
@@ -195,26 +195,26 @@  discard block
 block discarded – undo
195 195
                 ['product.*', 
196 196
                 'brand.title as brandtitle', 
197 197
                 'product_category.title as categorytitle']
198
-            )->with(array('productCategory', 'brand', 'subcategories', 'attributes',  'productImages','taxRate'))
198
+            )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages', 'taxRate'))
199 199
             ->leftJoin('product_category as product_category', 'product_category.id', '=', 'product.product_category_id')
200 200
             ->leftJoin('brand as brand', 'brand.id', '=', 'product.brand_id')
201 201
             ->where('product.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
202 202
             
203 203
             $datatables = \Datatables::of($product)
204
-            ->addColumn('rank', function ($product) {
204
+            ->addColumn('rank', function($product) {
205 205
                 return '<input type="text" class="change-rank" value="'.$product->rank.'" style="width:50px;" data-url="'.url()->route('product.change-rank', array('productId' => $product->id)).'">';
206 206
             })
207
-            ->filterColumn('categorytitle', function ($query, $keyword) {
207
+            ->filterColumn('categorytitle', function($query, $keyword) {
208 208
                 $query->whereRaw("product_category.title like ?", ["%{$keyword}%"]);
209 209
             })
210
-            ->addColumn('title', function ($product) {
210
+            ->addColumn('title', function($product) {
211 211
                 if ($product->brand) {
212 212
                     return $product->brand->title.' | '.$product->title;
213 213
                 }
214 214
                 
215 215
                 return $product->title;      
216 216
             })
217
-            ->addColumn('categorytitle', function ($product) {
217
+            ->addColumn('categorytitle', function($product) {
218 218
                 if ($product->subcategories()->count()) {
219 219
                     $subcategories = $product->subcategories()->pluck('title')->toArray();
220 220
                     return $product->categorytitle.', <small> '.implode(', ', $subcategories).'</small>';
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
     public function store(Request $request)
245 245
     {
246
-        $result  = ProductService::create($request->all());
246
+        $result = ProductService::create($request->all());
247 247
         return ProductService::notificationRedirect('product.index', $result, 'The product was inserted.');
248 248
     }
249 249
 
@@ -288,10 +288,10 @@  discard block
 block discarded – undo
288 288
     public function postExport()
289 289
     {
290 290
 
291
-        $result  =  ProductService::selectAllExport();
292
-        Excel::create('export', function ($excel) use ($result) {
291
+        $result = ProductService::selectAllExport();
292
+        Excel::create('export', function($excel) use ($result) {
293 293
 
294
-            $excel->sheet('Products', function ($sheet) use ($result) {
294
+            $excel->sheet('Products', function($sheet) use ($result) {
295 295
                 $newArray = array();
296 296
                 foreach ($result as $row) {
297 297
                     $category = "";
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
                         $i = 0;
321 321
                         foreach ($row->productImages as $image) {
322 322
                             $i++;
323
-                            $newArray[$row->id]['image_'.$i] =  url('/').'/files/product/800x800/'.$row->id.'/'.$image->file;
323
+                            $newArray[$row->id]['image_'.$i] = url('/').'/files/product/800x800/'.$row->id.'/'.$image->file;
324 324
                         }
325 325
                     }
326 326
                 }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
     public function update(Request $request, $productId)
391 391
     {
392 392
         $input = $request->all();
393
-        $result  = ProductService::updateById($input, $productId);
393
+        $result = ProductService::updateById($input, $productId);
394 394
 
395 395
         $redirect = redirect()->route('product.index');
396 396
 
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
     public function destroy($id)
422 422
     {
423
-        $result  = ProductService::destroy($id);
423
+        $result = ProductService::destroy($id);
424 424
 
425 425
         if ($result) {
426 426
             Notification::success('The product was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/InvoiceController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,15 +44,15 @@  discard block
 block discarded – undo
44 44
             
45 45
             $datatables = \Datatables::of($invoice)
46 46
 
47
-            ->addColumn('price_with_tax', function ($order) {
47
+            ->addColumn('price_with_tax', function($order) {
48 48
                 $money = '&euro; '.$order->price_with_tax;
49 49
                 return $money;
50 50
             })
51 51
 
52 52
 
53 53
 
54
-            ->addColumn('action', function ($invoice) {
55
-                $deleteLink = \Form::deleteajax('/invoice/'. $invoice->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
54
+            ->addColumn('action', function($invoice) {
55
+                $deleteLink = \Form::deleteajax('/invoice/'.$invoice->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
56 56
                 $download = '<a href="/invoice/'.$invoice->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a>  ';
57 57
                 $links = '<a href="/invoice/'.$invoice->id.'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a>  '.$download;
58 58
             
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     public function store()
92 92
     {
93
-        $result  = $this->invoice->create(Request::all());
93
+        $result = $this->invoice->create(Request::all());
94 94
 
95 95
         if (isset($result->id)) {
96 96
             \Notification::success('The invoice was inserted.');
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     public function update($invoiceId)
114 114
     {
115
-        $result  = $this->invoice->updateById(Request::all(), $invoiceId);
115
+        $result = $this->invoice->updateById(Request::all(), $invoiceId);
116 116
 
117 117
         if (isset($result->id)) {
118 118
             \Notification::success('The invoice was updated.');
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
     public function destroy($invoiceId)
127 127
     {
128
-        $result  = $this->invoice->destroy($invoiceId);
128
+        $result = $this->invoice->destroy($invoiceId);
129 129
 
130 130
         if ($result) {
131 131
             Notification::success('The invoice 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/FaqItemController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
             ->where('faq_item.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
37 37
 
38 38
             $datatables = Datatables::of($query)
39
-            ->addColumn('faqitemgroup', function ($query) {
39
+            ->addColumn('faqitemgroup', function($query) {
40 40
                 return $query->grouptitle;
41 41
             })
42
-            ->addColumn('action', function ($query) {
42
+            ->addColumn('action', function($query) {
43 43
                 $deleteLink = Form::deleteajax(url()->route('faq.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
44 44
                 $links = '<a href="'.url()->route('faq.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
45 45
             
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function store(Request $request)
63 63
     {
64
-        $result  = FaqService::create($request->all());
64
+        $result = FaqService::create($request->all());
65 65
         return FaqService::notificationRedirect('faq.index', $result, 'FaqItem was inserted.');
66 66
     }
67 67
 
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
 
74 74
     public function update(Request $request, $faqId)
75 75
     {
76
-        $result  = FaqService::updateById($request->all(), $faqId);
76
+        $result = FaqService::updateById($request->all(), $faqId);
77 77
         return FaqService::notificationRedirect('faq.index', $result, 'FaqItem was updated.');
78 78
     }
79 79
 
80 80
     public function destroy($faqItemId)
81 81
     {
82
-        $result  = FaqService::destroy($faqItemId);
82
+        $result = FaqService::destroy($faqItemId);
83 83
 
84 84
         if ($result) {
85 85
             Notification::success('The faq was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/NewsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
             ->with(array('newsGroup'))        ->leftJoin(NewsService::getGroupModel()->getTable(), NewsService::getGroupModel()->getTable().'.id', '=', 'news_group_id');
32 32
             
33 33
             $datatables = Datatables::of($query)
34
-            ->filterColumn('title', function ($query, $keyword) {
34
+            ->filterColumn('title', function($query, $keyword) {
35 35
 
36 36
                 $query->where(
37
-                    function ($query) use ($keyword) {
37
+                    function($query) use ($keyword) {
38 38
                         $query->whereRaw("news.title like ?", ["%{$keyword}%"]);
39 39
                         ;
40 40
                     }
41 41
                 );
42 42
             })
43
-            ->addColumn('newsgroup', function ($query) {
43
+            ->addColumn('newsgroup', function($query) {
44 44
                 return $query->newstitle;
45 45
             })
46 46
 
47
-            ->addColumn('action', function ($query) {
47
+            ->addColumn('action', function($query) {
48 48
                 $deleteLink = Form::deleteajax(url()->route('news.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
49 49
                 $links = '<a href="'.url()->route('news.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
50 50
             
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function store(Request $request)
67 67
     {
68
-        $result  = NewsService::create($request->all());
68
+        $result = NewsService::create($request->all());
69 69
         return NewsService::notificationRedirect('news.index', $result, 'The news item was inserted.');
70 70
     }
71 71
 
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
     
91 91
     public function update(Request $request, $newsId)
92 92
     {
93
-        $result  = NewsService::updateById($request->all(), $newsId);
93
+        $result = NewsService::updateById($request->all(), $newsId);
94 94
         return NewsService::notificationRedirect('news.index', $result, 'The news item was inserted.');
95 95
     }
96 96
 
97 97
     public function destroy($newsId)
98 98
     {
99
-        $result  = NewsService::destroy($newsId);
99
+        $result = NewsService::destroy($newsId);
100 100
 
101 101
         if ($result) {
102 102
             Notification::success('The news was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/HtmlBlockController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@  discard block
 block discarded – undo
30 30
             
31 31
             $datatables = Datatables::of($query)
32 32
 
33
-            ->addColumn('active', function ($query) {
33
+            ->addColumn('active', function($query) {
34 34
                 if ($query->active) {
35 35
                     return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-ok icon-green"></span></a>';
36 36
                 }
37 37
                 return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-remove icon-red"></span></a>';
38 38
             })
39
-            ->addColumn('image', function ($query) {
39
+            ->addColumn('image', function($query) {
40 40
                 if ($query->image_file_name) {
41 41
                     return '<img src="'.config('hideyo.public_path').'/html_block/'.$query->id.'/'.$query->image_file_name.'" width="200px" />';
42 42
                 }
43 43
             })
44
-            ->addColumn('action', function ($query) {
44
+            ->addColumn('action', function($query) {
45 45
                 $deleteLink = Form::deleteajax(url()->route('html-block.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
46 46
                 $copy = '<a href="/admin/html-block/'.$query->id.'/copy" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Copy</a>';
47 47
                 $links = '<a href="'.url()->route('html-block.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$copy.' '.$deleteLink;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function store(Request $request)
63 63
     {
64
-        $result  = HtmlBlockService::create($request->all());
64
+        $result = HtmlBlockService::create($request->all());
65 65
         return HtmlBlockService::notificationRedirect('html-block.index', $result, 'The html block was inserted.');     
66 66
     }
67 67
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     public function update(Request $request, $htmlBlockId)
80 80
     {
81
-        $result  = HtmlBlockService::updateById($request->all(), $htmlBlockId);
81
+        $result = HtmlBlockService::updateById($request->all(), $htmlBlockId);
82 82
             return HtmlBlockService::notificationRedirect('html-block.index', $result, 'The html block was updated.');     
83 83
     }
84 84
 
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
     {
98 98
         $htmlBlock = HtmlBlockService::find($htmlBlockId);
99 99
 
100
-        if($htmlBlock) {
101
-            $result  = HtmlBlockService::createCopy($request->all(), $htmlBlockId);
100
+        if ($htmlBlock) {
101
+            $result = HtmlBlockService::createCopy($request->all(), $htmlBlockId);
102 102
             return HtmlBlockService::notificationRedirect('html-block.index', $result, 'The html block was inserted.');      
103 103
         }
104 104
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
     public function destroy($htmlBlockId)
109 109
     {
110
-        $result  = HtmlBlockService::destroy($htmlBlockId);
110
+        $result = HtmlBlockService::destroy($htmlBlockId);
111 111
 
112 112
         if ($result) {
113 113
             Notification::success('The html block was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/PaymentMethodController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,22 +35,22 @@  discard block
 block discarded – undo
35 35
             
36 36
             $datatables = Datatables::of($query)
37 37
 
38
-            ->addColumn('orderconfirmed', function ($query) {
38
+            ->addColumn('orderconfirmed', function($query) {
39 39
                 if ($query->orderConfirmedOrderStatus) {
40 40
                     return $query->orderConfirmedOrderStatus->title;
41 41
                 }
42 42
             })
43
-            ->addColumn('paymentcompleted', function ($query) {
43
+            ->addColumn('paymentcompleted', function($query) {
44 44
                 if ($query->orderPaymentCompletedOrderStatus) {
45 45
                     return $query->orderPaymentCompletedOrderStatus->title;
46 46
                 }
47 47
             })
48
-            ->addColumn('paymentfailed', function ($query) {
48
+            ->addColumn('paymentfailed', function($query) {
49 49
                 if ($query->orderPaymentFailedOrderStatus) {
50 50
                     return $query->orderPaymentFailedOrderStatus->title;
51 51
                 }
52 52
             })
53
-            ->addColumn('action', function ($query) {
53
+            ->addColumn('action', function($query) {
54 54
                 $deleteLink = Form::deleteajax(url()->route('payment-method.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'));
55 55
                 $links = '<a href="'.url()->route('payment-method.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a>  '.$deleteLink;
56 56
                 return $links;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     public function store(Request $request)
77 77
     {
78
-        $result  = PaymentMethodService::create($request->all());
78
+        $result = PaymentMethodService::create($request->all());
79 79
         return PaymentMethodService::notificationRedirect('payment-method.index', $result, 'The payment method was inserted.');
80 80
     }
81 81
 
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
 
93 93
     public function update(Request $request, $paymentMethodId)
94 94
     {
95
-        $result  = PaymentMethodService::updateById($request->all(), $paymentMethodId);
95
+        $result = PaymentMethodService::updateById($request->all(), $paymentMethodId);
96 96
         return PaymentMethodService::notificationRedirect('payment-method.index', $result, 'The payment method was updated.');
97 97
     }
98 98
 
99 99
     public function destroy($paymentMethodId)
100 100
     {
101
-        $result  = PaymentMethodService::destroy($paymentMethodId);
101
+        $result = PaymentMethodService::destroy($paymentMethodId);
102 102
 
103 103
         if ($result) {
104 104
             Notification::success('The payment method was deleted.');
Please login to merge, or discard this patch.