@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | public function index($productId) |
25 | 25 | { |
26 | - $product = ProductService::find($productId); |
|
26 | + $product = ProductService::find($productId); |
|
27 | 27 | if ($this->request->wantsJson()) { |
28 | 28 | |
29 | 29 | $query = ProductService::getImageModel()->where('product_id', '=', $productId); |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | foreach ($newProductAttributes as $key => $productAttribute) { |
102 | 102 | $newArray = array(); |
103 | 103 | foreach ($productAttribute as $keyNew => $valueNew) { |
104 | - $newArray[] = $keyNew.': '.$valueNew['value']; |
|
105 | - $attributesList[$valueNew['id']] = $valueNew['value']; |
|
104 | + $newArray[] = $keyNew.': '.$valueNew['value']; |
|
105 | + $attributesList[$valueNew['id']] = $valueNew['value']; |
|
106 | 106 | } |
107 | 107 | $productAttributesList[$key] = implode(', ', $newArray); |
108 | 108 | } |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | $query = ProductService::getImageModel()->where('product_id', '=', $productId); |
30 | 30 | |
31 | 31 | $datatables = \Datatables::of($query) |
32 | - ->addColumn('thumb', function ($query) use ($productId) { |
|
32 | + ->addColumn('thumb', function($query) use ($productId) { |
|
33 | 33 | return '<img src="/files/product/100x100/'.$query->product_id.'/'.$query->file.'" />'; |
34 | 34 | }) |
35 | 35 | |
36 | - ->addColumn('action', function ($query) use ($productId) { |
|
36 | + ->addColumn('action', function($query) use ($productId) { |
|
37 | 37 | $deleteLink = \Form::deleteajax(url()->route('product.images.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.images.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 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | public function store($productId) |
57 | 57 | { |
58 | - $result = ProductService::createImage($this->request->all(), $productId); |
|
58 | + $result = ProductService::createImage($this->request->all(), $productId); |
|
59 | 59 | return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was inserted.'); |
60 | 60 | } |
61 | 61 | |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | |
70 | 70 | if ($productImage->relatedProductAttributes->count()) { |
71 | 71 | foreach ($productImage->relatedProductAttributes as $row) { |
72 | - $selectedProductAttributes[] = $row->pivot->product_attribute_id; |
|
72 | + $selectedProductAttributes[] = $row->pivot->product_attribute_id; |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | |
76 | 76 | if ($productImage->relatedAttributes->count()) { |
77 | 77 | foreach ($productImage->relatedAttributes as $row) { |
78 | - $selectedAttributes[] = $row->pivot->attribute_id; |
|
78 | + $selectedAttributes[] = $row->pivot->attribute_id; |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | public function generateAttributeLists($product) |
86 | 86 | { |
87 | - $productAttributes = $product->attributes; |
|
87 | + $productAttributes = $product->attributes; |
|
88 | 88 | $newProductAttributes = array(); |
89 | 89 | $attributesList = array(); |
90 | 90 | $productAttributesList = array(); |
@@ -114,13 +114,13 @@ discard block |
||
114 | 114 | |
115 | 115 | public function update($productId, $productImageId) |
116 | 116 | { |
117 | - $result = ProductService::updateImageById($this->request->all(), $productId, $productImageId); |
|
117 | + $result = ProductService::updateImageById($this->request->all(), $productId, $productImageId); |
|
118 | 118 | return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was update.'); |
119 | 119 | } |
120 | 120 | |
121 | 121 | public function destroy($productId, $productImageId) |
122 | 122 | { |
123 | - $result = ProductService::destroyImage($productImageId); |
|
123 | + $result = ProductService::destroyImage($productImageId); |
|
124 | 124 | |
125 | 125 | if ($result) { |
126 | 126 | Notification::success('The product image is deleted.'); |
@@ -37,22 +37,22 @@ discard block |
||
37 | 37 | |
38 | 38 | $datatables = Datatables::of($query) |
39 | 39 | |
40 | - ->addColumn('orderconfirmed', function ($query) { |
|
40 | + ->addColumn('orderconfirmed', function($query) { |
|
41 | 41 | if ($query->orderConfirmedOrderStatus) { |
42 | 42 | return $query->orderConfirmedOrderStatus->title; |
43 | 43 | } |
44 | 44 | }) |
45 | - ->addColumn('paymentcompleted', function ($query) { |
|
45 | + ->addColumn('paymentcompleted', function($query) { |
|
46 | 46 | if ($query->orderPaymentCompletedOrderStatus) { |
47 | 47 | return $query->orderPaymentCompletedOrderStatus->title; |
48 | 48 | } |
49 | 49 | }) |
50 | - ->addColumn('paymentfailed', function ($query) { |
|
50 | + ->addColumn('paymentfailed', function($query) { |
|
51 | 51 | if ($query->orderPaymentFailedOrderStatus) { |
52 | 52 | return $query->orderPaymentFailedOrderStatus->title; |
53 | 53 | } |
54 | 54 | }) |
55 | - ->addColumn('action', function ($query) { |
|
55 | + ->addColumn('action', function($query) { |
|
56 | 56 | $deleteLink = Form::deleteajax(url()->route('payment-method.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
57 | 57 | $links = '<a href="'.url()->route('payment-method.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
58 | 58 | return $links; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | public function store() |
79 | 79 | { |
80 | - $result = PaymentMethodService::create($this->request->all()); |
|
80 | + $result = PaymentMethodService::create($this->request->all()); |
|
81 | 81 | return PaymentMethodService::notificationRedirect('payment-method.index', $result, 'The payment method was inserted.'); |
82 | 82 | } |
83 | 83 | |
@@ -94,13 +94,13 @@ discard block |
||
94 | 94 | |
95 | 95 | public function update($paymentMethodId) |
96 | 96 | { |
97 | - $result = PaymentMethodService::updateById($this->request->all(), $paymentMethodId); |
|
97 | + $result = PaymentMethodService::updateById($this->request->all(), $paymentMethodId); |
|
98 | 98 | return PaymentMethodService::notificationRedirect('payment-method.index', $result, 'The payment method was updated.'); |
99 | 99 | } |
100 | 100 | |
101 | 101 | public function destroy($paymentMethodId) |
102 | 102 | { |
103 | - $result = PaymentMethodService::destroy($paymentMethodId); |
|
103 | + $result = PaymentMethodService::destroy($paymentMethodId); |
|
104 | 104 | |
105 | 105 | if ($result) { |
106 | 106 | Notification::success('The payment method was deleted.'); |
@@ -24,11 +24,11 @@ |
||
24 | 24 | [ |
25 | 25 | |
26 | 26 | 'id', |
27 | - 'class', 'file' , 'status_code', 'line', 'message', 'url', 'method'] |
|
27 | + 'class', 'file', 'status_code', 'line', 'message', 'url', 'method'] |
|
28 | 28 | ); |
29 | 29 | |
30 | - $datatables = \Datatables::of($query)->addColumn('action', function ($query) { |
|
31 | - $deleteLink = \Form::deleteajax('/admin/general-setting/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
30 | + $datatables = \Datatables::of($query)->addColumn('action', function($query) { |
|
31 | + $deleteLink = \Form::deleteajax('/admin/general-setting/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
32 | 32 | $links = '<a href="/admin/general-setting/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
33 | 33 | |
34 | 34 | return $links; |
@@ -47,6 +47,6 @@ |
||
47 | 47 | public function store($productId, Request $request) |
48 | 48 | { |
49 | 49 | $result = ProductExtraFieldValueService::create($request->all(), $productId); |
50 | - return ProductExtraFieldValueService::notificationRedirect(array('product.product-extra-field-value.index', $productId), $result, 'The product extra fields are updated.'); |
|
50 | + return ProductExtraFieldValueService::notificationRedirect(array('product.product-extra-field-value.index', $productId), $result, 'The product extra fields are updated.'); |
|
51 | 51 | } |
52 | 52 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | public function store($productId, Request $request) |
48 | 48 | { |
49 | - $result = ProductExtraFieldValueService::create($request->all(), $productId); |
|
49 | + $result = ProductExtraFieldValueService::create($request->all(), $productId); |
|
50 | 50 | return ProductExtraFieldValueService::notificationRedirect(array('product.product-extra-field-value.index', $productId), $result, 'The product extra fields are updated.'); |
51 | 51 | } |
52 | 52 | } |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | $query = RedirectService::selectAll(); |
26 | 26 | $datatables = \Datatables::of($query) |
27 | 27 | |
28 | - ->addColumn('url', function ($query) { |
|
28 | + ->addColumn('url', function($query) { |
|
29 | 29 | return '<a href="'.$query->url.'" target="_blank">'.$query->url.'</a>'; |
30 | 30 | }) |
31 | 31 | |
32 | - ->addColumn('action', function ($query) { |
|
32 | + ->addColumn('action', function($query) { |
|
33 | 33 | $deleteLink = \Form::deleteajax(url()->route('redirect.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
34 | 34 | $links = '<a href="'.url()->route('redirect.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
35 | 35 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | public function store() |
53 | 53 | { |
54 | - $result = RedirectService::create(Request::all()); |
|
54 | + $result = RedirectService::create(Request::all()); |
|
55 | 55 | return RedirectService::notificationRedirect('redirect.index', $result, 'The redirect was inserted.'); |
56 | 56 | } |
57 | 57 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | public function postImport() |
73 | 73 | { |
74 | 74 | $file = Request::file('file'); |
75 | - Excel::load($file, function ($reader) { |
|
75 | + Excel::load($file, function($reader) { |
|
76 | 76 | |
77 | 77 | $results = $reader->get(); |
78 | 78 | |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | |
92 | 92 | public function getExport() |
93 | 93 | { |
94 | - $result = RedirectService::selectAll(); |
|
94 | + $result = RedirectService::selectAll(); |
|
95 | 95 | |
96 | - Excel::create('redirects', function ($excel) use ($result) { |
|
96 | + Excel::create('redirects', function($excel) use ($result) { |
|
97 | 97 | |
98 | - $excel->sheet('Redirects', function ($sheet) use ($result) { |
|
98 | + $excel->sheet('Redirects', function($sheet) use ($result) { |
|
99 | 99 | $newArray = array(); |
100 | 100 | foreach ($result as $row) { |
101 | 101 | $newArray[$row->id] = array( |
@@ -112,13 +112,13 @@ discard block |
||
112 | 112 | |
113 | 113 | public function update($redirectId) |
114 | 114 | { |
115 | - $result = RedirectService::updateById(Request::all(), $redirectId); |
|
115 | + $result = RedirectService::updateById(Request::all(), $redirectId); |
|
116 | 116 | return RedirectService::notificationRedirect('redirect.index', $result, 'The redirect was updated.'); |
117 | 117 | } |
118 | 118 | |
119 | 119 | public function destroy($redirectId) |
120 | 120 | { |
121 | - $result = RedirectService::destroy($redirectId); |
|
121 | + $result = RedirectService::destroy($redirectId); |
|
122 | 122 | |
123 | 123 | if ($result) { |
124 | 124 | Notification::success('Redirect item is deleted.'); |
@@ -259,9 +259,9 @@ |
||
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 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | public function index() |
33 | 33 | { |
34 | - $shop = auth('hideyobackend')->user()->shop; |
|
34 | + $shop = auth('hideyobackend')->user()->shop; |
|
35 | 35 | $now = Carbon::now(); |
36 | 36 | |
37 | 37 | $revenueThisMonth = null; |
@@ -61,15 +61,15 @@ discard block |
||
61 | 61 | |
62 | 62 | $datatables = \Datatables::of($order) |
63 | 63 | |
64 | - ->addColumn('generated_custom_order_id', function ($order) { |
|
64 | + ->addColumn('generated_custom_order_id', function($order) { |
|
65 | 65 | return $order->generated_custom_order_id; |
66 | 66 | }) |
67 | 67 | |
68 | - ->addColumn('created_at', function ($order) { |
|
68 | + ->addColumn('created_at', function($order) { |
|
69 | 69 | return date('d F H:i', strtotime($order->created_at)); |
70 | 70 | }) |
71 | 71 | |
72 | - ->addColumn('status', function ($order) { |
|
72 | + ->addColumn('status', function($order) { |
|
73 | 73 | if ($order->orderStatus) { |
74 | 74 | if ($order->orderStatus->color) { |
75 | 75 | 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>'; |
@@ -78,46 +78,46 @@ discard block |
||
78 | 78 | } |
79 | 79 | }) |
80 | 80 | |
81 | - ->filterColumn('client', function ($query, $keyword) { |
|
81 | + ->filterColumn('client', function($query, $keyword) { |
|
82 | 82 | |
83 | 83 | $query->where( |
84 | - function ($query) use ($keyword) { |
|
84 | + function($query) use ($keyword) { |
|
85 | 85 | $query->whereRaw("order_address.firstname like ?", ["%{$keyword}%"]); |
86 | 86 | $query->orWhereRaw("order_address.lastname like ?", ["%{$keyword}%"]); |
87 | 87 | ; |
88 | 88 | } |
89 | 89 | ); |
90 | 90 | }) |
91 | - ->addColumn('client', function ($order) { |
|
91 | + ->addColumn('client', function($order) { |
|
92 | 92 | if ($order->client) { |
93 | 93 | if ($order->orderBillAddress) { |
94 | - return '<a href="/admin/client/'.$order->client_id.'/order">'.$order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname.' ('.$order->client->orders->count() .')</a>'; |
|
94 | + return '<a href="/admin/client/'.$order->client_id.'/order">'.$order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname.' ('.$order->client->orders->count().')</a>'; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | }) |
98 | - ->addColumn('products', function ($order) { |
|
98 | + ->addColumn('products', function($order) { |
|
99 | 99 | if ($order->products) { |
100 | 100 | return $order->products->count(); |
101 | 101 | } |
102 | 102 | }) |
103 | - ->addColumn('price_with_tax', function ($order) { |
|
103 | + ->addColumn('price_with_tax', function($order) { |
|
104 | 104 | $money = '€ '.$order->getPriceWithTaxNumberFormat(); |
105 | 105 | return $money; |
106 | 106 | }) |
107 | 107 | |
108 | 108 | |
109 | - ->addColumn('paymentMethod', function ($order) { |
|
109 | + ->addColumn('paymentMethod', function($order) { |
|
110 | 110 | if ($order->orderPaymentMethod) { |
111 | 111 | return $order->orderPaymentMethod->title; |
112 | 112 | } |
113 | 113 | }) |
114 | - ->addColumn('sendingMethod', function ($order) { |
|
114 | + ->addColumn('sendingMethod', function($order) { |
|
115 | 115 | if ($order->orderSendingMethod) { |
116 | 116 | return $order->orderSendingMethod->title; |
117 | 117 | } |
118 | 118 | }) |
119 | - ->addColumn('action', function ($order) { |
|
120 | - $deleteLink = \Form::deleteajax('/admin/order/'. $order->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
119 | + ->addColumn('action', function($order) { |
|
120 | + $deleteLink = \Form::deleteajax('/admin/order/'.$order->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
121 | 121 | $download = '<a href="/admin/order/'.$order->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a> '; |
122 | 122 | |
123 | 123 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | if ($data and $data['order']) { |
152 | 152 | |
153 | - if($data['type'] == 'one-pdf') { |
|
153 | + if ($data['type'] == 'one-pdf') { |
|
154 | 154 | $pdfHtml = ""; |
155 | 155 | $countOrders = count($data['order']); |
156 | 156 | $i = 0; |
@@ -176,15 +176,15 @@ discard block |
||
176 | 176 | $pdf = PDF::loadHTML($pdfHtmlBody); |
177 | 177 | |
178 | 178 | return $pdf->download('order-'.$order->generated_custom_order_id.'.pdf'); |
179 | - } elseif($data['type'] == 'product-list') { |
|
179 | + } elseif ($data['type'] == 'product-list') { |
|
180 | 180 | $products = OrderService::productsByOrderIds($data['order']); |
181 | 181 | |
182 | - if($products) { |
|
182 | + if ($products) { |
|
183 | 183 | |
184 | 184 | |
185 | - Excel::create('products', function ($excel) use ($products) { |
|
185 | + Excel::create('products', function($excel) use ($products) { |
|
186 | 186 | |
187 | - $excel->sheet('Products', function ($sheet) use ($products) { |
|
187 | + $excel->sheet('Products', function($sheet) use ($products) { |
|
188 | 188 | $newArray = array(); |
189 | 189 | foreach ($products as $key => $row) { |
190 | 190 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | if ($orders) { |
217 | 217 | Request::session()->put('print_orders', $orders->toArray()); |
218 | - return response()->json(array('orders' => $orders->toArray() )); |
|
218 | + return response()->json(array('orders' => $orders->toArray())); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | Request::session()->destroy('print_orders'); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | public function downloadLabel($orderId) |
259 | 259 | { |
260 | 260 | $order = OrderService::find($orderId); |
261 | - if($order->orderLabel()->count()) { |
|
261 | + if ($order->orderLabel()->count()) { |
|
262 | 262 | header("Content-type: application/octet-stream"); |
263 | 263 | header("Content-disposition: attachment;filename=label.pdf"); |
264 | 264 | echo $order->orderLabel->data; |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | |
291 | 291 | ); |
292 | 292 | foreach ($replace as $key => $val) { |
293 | - $content = str_replace("[" . $key . "]", $val, $content); |
|
293 | + $content = str_replace("[".$key."]", $val, $content); |
|
294 | 294 | } |
295 | 295 | |
296 | 296 | return $content; |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | |
304 | 304 | public function update($orderId) |
305 | 305 | { |
306 | - $result = OrderService::updateById(Request::all(), $orderId); |
|
306 | + $result = OrderService::updateById(Request::all(), $orderId); |
|
307 | 307 | |
308 | 308 | if ($result->errors()->all()) { |
309 | 309 | return redirect()->back()->withInput()->withErrors($result->errors()->all()); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | $product = ProductService::find($productId); |
35 | 35 | |
36 | - if($product) { |
|
36 | + if ($product) { |
|
37 | 37 | if ($this->request->wantsJson()) { |
38 | 38 | |
39 | 39 | $query = ProductCombinationService::getModel()->select( |
@@ -41,18 +41,18 @@ discard block |
||
41 | 41 | 'default_on'] |
42 | 42 | )->where('product_id', '=', $productId); |
43 | 43 | |
44 | - $datatables = \Datatables::of($query)->addColumn('action', function ($query) use ($productId) { |
|
44 | + $datatables = \Datatables::of($query)->addColumn('action', function($query) use ($productId) { |
|
45 | 45 | $deleteLink = \Form::deleteajax(url()->route('product-combination.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
46 | 46 | $links = '<a href="'.url()->route('product-combination.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
47 | 47 | |
48 | 48 | return $links; |
49 | 49 | }) |
50 | 50 | |
51 | - ->addColumn('amount', function ($query) { |
|
51 | + ->addColumn('amount', function($query) { |
|
52 | 52 | return '<input type="text" class="change-amount-product-attribute" value="'.$query->amount.'" data-url="/admin/product/'.$query->product_id.'/product-combination/change-amount-attribute/'.$query->id.'">'; |
53 | 53 | }) |
54 | 54 | |
55 | - ->addColumn('price', function ($query) { |
|
55 | + ->addColumn('price', function($query) { |
|
56 | 56 | $result = 0; |
57 | 57 | if ($query->price) { |
58 | 58 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | 'amount' => $query->amount |
102 | 102 | ); |
103 | 103 | |
104 | - $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
104 | + $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
105 | 105 | |
106 | 106 | |
107 | 107 | if ($query->discount_value) { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | return $result; |
113 | 113 | }) |
114 | 114 | |
115 | - ->addColumn('combinations', function ($query) use ($productId) { |
|
115 | + ->addColumn('combinations', function($query) use ($productId) { |
|
116 | 116 | $items = array(); |
117 | 117 | foreach ($query->combinations as $row) { |
118 | 118 | $items[] = $row->attribute->attributeGroup->title.': '.$row->attribute->value; |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | |
158 | 158 | public function store($productId) |
159 | 159 | { |
160 | - $result = ProductCombinationService::create($this->request->all(), $productId); |
|
161 | - if($result) { |
|
160 | + $result = ProductCombinationService::create($this->request->all(), $productId); |
|
161 | + if ($result) { |
|
162 | 162 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product extra fields are updated.'); |
163 | 163 | |
164 | 164 | } |
@@ -195,14 +195,14 @@ discard block |
||
195 | 195 | public function update($productId, $id) |
196 | 196 | { |
197 | 197 | |
198 | - $result = ProductCombinationService::updateById($this->request->all(), $productId, $id); |
|
198 | + $result = ProductCombinationService::updateById($this->request->all(), $productId, $id); |
|
199 | 199 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product combinations are updated.'); |
200 | 200 | |
201 | 201 | } |
202 | 202 | |
203 | 203 | public function destroy($productId, $id) |
204 | 204 | { |
205 | - $result = ProductCombinationService::destroy($id); |
|
205 | + $result = ProductCombinationService::destroy($id); |
|
206 | 206 | |
207 | 207 | if ($result) { |
208 | 208 | Notification::success('The product combination is deleted.'); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | 'name', 'value'] |
27 | 27 | )->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
28 | 28 | |
29 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) { |
|
29 | + $datatables = Datatables::of($query)->addColumn('action', function($query) { |
|
30 | 30 | $deleteLink = Form::deleteajax(url()->route('general-setting.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
31 | 31 | $links = '<a href="'.url()->route('general-setting.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
32 | 32 | return $links; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | public function store() |
47 | 47 | { |
48 | - $result = GeneralSettingService::create($this->request->all()); |
|
48 | + $result = GeneralSettingService::create($this->request->all()); |
|
49 | 49 | return GeneralSettingService::notificationRedirect('general-setting.index', $result, 'The general setting was inserted.'); |
50 | 50 | } |
51 | 51 | |
@@ -56,13 +56,13 @@ discard block |
||
56 | 56 | |
57 | 57 | public function update($generalSettingId) |
58 | 58 | { |
59 | - $result = GeneralSettingService::updateById($this->request->all(), $generalSettingId); |
|
59 | + $result = GeneralSettingService::updateById($this->request->all(), $generalSettingId); |
|
60 | 60 | return GeneralSettingService::notificationRedirect('general-setting.index', $result, 'The general setting was updated.'); |
61 | 61 | } |
62 | 62 | |
63 | 63 | public function destroy($generalSettingId) |
64 | 64 | { |
65 | - $result = GeneralSettingService::destroy($generalSettingId); |
|
65 | + $result = GeneralSettingService::destroy($generalSettingId); |
|
66 | 66 | if ($result) { |
67 | 67 | Notification::error('The general setting was deleted.'); |
68 | 68 | return redirect()->route('general-setting.index'); |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | if ($request->wantsJson()) { |
31 | 31 | |
32 | 32 | $query = AttributeService::getModel() |
33 | - ->select(['id','value']) |
|
33 | + ->select(['id', 'value']) |
|
34 | 34 | ->where('attribute_group_id', '=', $attributeGroupId); |
35 | 35 | |
36 | 36 | $datatables = Datatables::of($query) |
37 | - ->addColumn('action', function ($query) use ($attributeGroupId) { |
|
37 | + ->addColumn('action', function($query) use ($attributeGroupId) { |
|
38 | 38 | $deleteLink = Form::deleteajax(url()->route('attribute.destroy', array('attributeGroupId' => $attributeGroupId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
39 | 39 | $links = ' <a href="'.url()->route('attribute.edit', array('attributeGroupId' => $attributeGroupId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>'.$deleteLink; |
40 | 40 | return $links; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function store(Request $request, $attributeGroupId) |
68 | 68 | { |
69 | - $result = AttributeService::create($request->all(), $attributeGroupId); |
|
69 | + $result = AttributeService::create($request->all(), $attributeGroupId); |
|
70 | 70 | return AttributeService::notificationRedirect(array('attribute.index', $attributeGroupId), $result, 'The attribute was inserted.'); |
71 | 71 | } |
72 | 72 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function update(Request $request, $attributeGroupId, $attributeId) |
92 | 92 | { |
93 | - $result = AttributeService::updateById($request->all(), $attributeGroupId, $attributeId); |
|
93 | + $result = AttributeService::updateById($request->all(), $attributeGroupId, $attributeId); |
|
94 | 94 | return AttributeService::notificationRedirect(array('attribute.index', $attributeGroupId), $result, 'The attribute was updated.'); |
95 | 95 | } |
96 | 96 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function destroy($attributeGroupId, $attributeId) |
104 | 104 | { |
105 | - $result = AttributeService::destroy($attributeId); |
|
105 | + $result = AttributeService::destroy($attributeId); |
|
106 | 106 | |
107 | 107 | if ($result) { |
108 | 108 | Notification::success('Atrribute was deleted.'); |