@@ -27,7 +27,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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.'); |
@@ -24,11 +24,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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.'); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | ['product.*', |
30 | 30 | 'brand.title as brandtitle', |
31 | 31 | 'product_category.title as categorytitle'] |
32 | - )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages','taxRate')) |
|
32 | + )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages', 'taxRate')) |
|
33 | 33 | |
34 | 34 | ->leftJoin('product_category as product_category', 'product_category.id', '=', 'product.product_category_id') |
35 | 35 | |
@@ -38,23 +38,23 @@ discard block |
||
38 | 38 | ->where('product.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
39 | 39 | |
40 | 40 | $datatables = \DataTables::of($product) |
41 | - ->filterColumn('reference_code', function ($query, $keyword) { |
|
41 | + ->filterColumn('reference_code', function($query, $keyword) { |
|
42 | 42 | $query->whereRaw("product.reference_code like ?", ["%{$keyword}%"]); |
43 | 43 | }) |
44 | - ->filterColumn('active', function ($query, $keyword) { |
|
44 | + ->filterColumn('active', function($query, $keyword) { |
|
45 | 45 | $query->whereRaw("product.active like ?", ["%{$keyword}%"]); |
46 | 46 | ; |
47 | 47 | }) |
48 | 48 | |
49 | - ->addColumn('rank', function ($product) { |
|
49 | + ->addColumn('rank', function($product) { |
|
50 | 50 | return '<input type="text" class="change-rank" value="'.$product->rank.'" style="width:50px;" data-url="/admin/product/change-rank/'.$product->id.'">'; |
51 | 51 | |
52 | 52 | }) |
53 | 53 | |
54 | - ->filterColumn('title', function ($query, $keyword) { |
|
54 | + ->filterColumn('title', function($query, $keyword) { |
|
55 | 55 | |
56 | 56 | $query->where( |
57 | - function ($query) use ($keyword) { |
|
57 | + function($query) use ($keyword) { |
|
58 | 58 | $query->whereRaw("product.title like ?", ["%{$keyword}%"]); |
59 | 59 | $query->orWhereRaw("product.reference_code like ?", ["%{$keyword}%"]); |
60 | 60 | $query->orWhereRaw("brand.title like ?", ["%{$keyword}%"]); |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | ); |
64 | 64 | }) |
65 | 65 | |
66 | - ->filterColumn('categorytitle', function ($query, $keyword) { |
|
66 | + ->filterColumn('categorytitle', function($query, $keyword) { |
|
67 | 67 | $query->whereRaw("product_category.title like ?", ["%{$keyword}%"]); |
68 | 68 | }) |
69 | 69 | |
70 | - ->addColumn('active', function ($product) { |
|
70 | + ->addColumn('active', function($product) { |
|
71 | 71 | if ($product->active) { |
72 | 72 | 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>'; |
73 | 73 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | 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>'; |
76 | 76 | }) |
77 | 77 | |
78 | - ->addColumn('title', function ($product) { |
|
78 | + ->addColumn('title', function($product) { |
|
79 | 79 | if ($product->brand) { |
80 | 80 | return $product->brand->title.' | '.$product->title; |
81 | 81 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | }) |
85 | 85 | |
86 | 86 | |
87 | - ->addColumn('amount', function ($product) { |
|
87 | + ->addColumn('amount', function($product) { |
|
88 | 88 | if ($product->attributes->count()) { |
89 | 89 | return '<a href="/admin/product/'.$product->id.'/product-combination">combinations</a>'; |
90 | 90 | } |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | return '<input type="text" class="change-amount" value="'.$product->amount.'" style="width:50px;" data-url="'.url()->route('product.change-amount', array('productId' => $product->id)).'">'; |
93 | 93 | }) |
94 | 94 | |
95 | - ->addColumn('image', function ($product) { |
|
95 | + ->addColumn('image', function($product) { |
|
96 | 96 | if ($product->productImages->count()) { |
97 | 97 | return '<img src="/files/product/100x100/'.$product->id.'/'.$product->productImages->first()->file.'" />'; |
98 | 98 | } |
99 | 99 | }) |
100 | - ->addColumn('price', function ($product) { |
|
100 | + ->addColumn('price', function($product) { |
|
101 | 101 | |
102 | 102 | $result = ""; |
103 | 103 | if ($product->price) { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | 'amount' => $product->amount |
148 | 148 | ); |
149 | 149 | |
150 | - $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
150 | + $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
151 | 151 | |
152 | 152 | |
153 | 153 | if ($product->discount_value) { |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | }) |
160 | 160 | |
161 | 161 | |
162 | - ->addColumn('categorytitle', function ($product) { |
|
162 | + ->addColumn('categorytitle', function($product) { |
|
163 | 163 | if ($product->subcategories()->count()) { |
164 | 164 | $subcategories = $product->subcategories()->pluck('title')->toArray(); |
165 | 165 | return $product->categorytitle.', <small> '.implode(', ', $subcategories).'</small>'; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | return $product->categorytitle; |
169 | 169 | }) |
170 | 170 | |
171 | - ->addColumn('action', function ($product) { |
|
171 | + ->addColumn('action', function($product) { |
|
172 | 172 | $deleteLink = \Form::deleteajax(url()->route('product.destroy', $product->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'), $product->title); |
173 | 173 | $copy = '<a href="'.url()->route('product.copy', $product->id).'" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Copy</a>'; |
174 | 174 | |
@@ -191,26 +191,26 @@ discard block |
||
191 | 191 | ['product.*', |
192 | 192 | 'brand.title as brandtitle', |
193 | 193 | 'product_category.title as categorytitle'] |
194 | - )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages','taxRate')) |
|
194 | + )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages', 'taxRate')) |
|
195 | 195 | ->leftJoin('product_category as product_category', 'product_category.id', '=', 'product.product_category_id') |
196 | 196 | ->leftJoin('brand as brand', 'brand.id', '=', 'product.brand_id') |
197 | 197 | ->where('product.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
198 | 198 | |
199 | 199 | $datatables = \DataTables::of($product) |
200 | - ->addColumn('rank', function ($product) { |
|
200 | + ->addColumn('rank', function($product) { |
|
201 | 201 | return '<input type="text" class="change-rank" value="'.$product->rank.'" style="width:50px;" data-url="'.url()->route('product.change-rank', array('productId' => $product->id)).'">'; |
202 | 202 | }) |
203 | - ->filterColumn('categorytitle', function ($query, $keyword) { |
|
203 | + ->filterColumn('categorytitle', function($query, $keyword) { |
|
204 | 204 | $query->whereRaw("product_category.title like ?", ["%{$keyword}%"]); |
205 | 205 | }) |
206 | - ->addColumn('title', function ($product) { |
|
206 | + ->addColumn('title', function($product) { |
|
207 | 207 | if ($product->brand) { |
208 | 208 | return $product->brand->title.' | '.$product->title; |
209 | 209 | } |
210 | 210 | |
211 | 211 | return $product->title; |
212 | 212 | }) |
213 | - ->addColumn('categorytitle', function ($product) { |
|
213 | + ->addColumn('categorytitle', function($product) { |
|
214 | 214 | if ($product->subcategories()->count()) { |
215 | 215 | $subcategories = $product->subcategories()->pluck('title')->toArray(); |
216 | 216 | return $product->categorytitle.', <small> '.implode(', ', $subcategories).'</small>'; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | |
240 | 240 | public function store(Request $request) |
241 | 241 | { |
242 | - $result = ProductService::create($request->all()); |
|
242 | + $result = ProductService::create($request->all()); |
|
243 | 243 | return ProductService::notificationRedirect('product.index', $result, 'The product was inserted.'); |
244 | 244 | } |
245 | 245 | |
@@ -284,10 +284,10 @@ discard block |
||
284 | 284 | public function postExport() |
285 | 285 | { |
286 | 286 | |
287 | - $result = ProductService::selectAllExport(); |
|
288 | - Excel::create('export', function ($excel) use ($result) { |
|
287 | + $result = ProductService::selectAllExport(); |
|
288 | + Excel::create('export', function($excel) use ($result) { |
|
289 | 289 | |
290 | - $excel->sheet('Products', function ($sheet) use ($result) { |
|
290 | + $excel->sheet('Products', function($sheet) use ($result) { |
|
291 | 291 | $newArray = array(); |
292 | 292 | foreach ($result as $row) { |
293 | 293 | $category = ""; |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $i = 0; |
317 | 317 | foreach ($row->productImages as $image) { |
318 | 318 | $i++; |
319 | - $newArray[$row->id]['image_'.$i] = url('/').'/files/product/800x800/'.$row->id.'/'.$image->file; |
|
319 | + $newArray[$row->id]['image_'.$i] = url('/').'/files/product/800x800/'.$row->id.'/'.$image->file; |
|
320 | 320 | } |
321 | 321 | } |
322 | 322 | } |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | public function update(Request $request, $productId) |
387 | 387 | { |
388 | 388 | $input = $request->all(); |
389 | - $result = ProductService::updateById($input, $productId); |
|
389 | + $result = ProductService::updateById($input, $productId); |
|
390 | 390 | |
391 | 391 | $redirect = redirect()->route('product.index'); |
392 | 392 | |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | |
417 | 417 | public function destroy($id) |
418 | 418 | { |
419 | - $result = ProductService::destroy($id); |
|
419 | + $result = ProductService::destroy($id); |
|
420 | 420 | |
421 | 421 | if ($result) { |
422 | 422 | Notification::success('The product was deleted.'); |
@@ -26,14 +26,14 @@ discard block |
||
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 |
||
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 |
||
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.'); |
@@ -25,7 +25,7 @@ discard block |
||
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 |
||
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 |
||
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.'); |
@@ -27,13 +27,13 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -26,10 +26,10 @@ discard block |
||
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 |
||
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 |
||
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.'); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | if ($request->wantsJson()) { |
31 | 31 | $query = AttributeService::getGroupModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
32 | 32 | |
33 | - $datatables = DataTables::of($query)->addColumn('action', function ($query) { |
|
33 | + $datatables = DataTables::of($query)->addColumn('action', function($query) { |
|
34 | 34 | $deleteLink = Form::deleteajax(url()->route('attribute-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
35 | 35 | $links = ' |
36 | 36 | <a href="'.url()->route('attribute.index', $query->id).'" class="btn btn-sm btn-info"><i class="entypo-pencil"></i>'.$query->attributes->count().' Attributes</a> |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | public function store(Request $request) |
54 | 54 | { |
55 | - $result = AttributeService::createGroup($request->all()); |
|
55 | + $result = AttributeService::createGroup($request->all()); |
|
56 | 56 | return AttributeService::notificationRedirect('attribute-group.index', $result, 'The attribute group was inserted.'); |
57 | 57 | } |
58 | 58 | |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | |
64 | 64 | public function update(Request $request, $attributeGroupId) |
65 | 65 | { |
66 | - $result = AttributeService::updateGroupById($request->all(), $attributeGroupId); |
|
66 | + $result = AttributeService::updateGroupById($request->all(), $attributeGroupId); |
|
67 | 67 | return AttributeService::notificationRedirect('attribute-group.index', $result, 'The attribute group was updated.'); |
68 | 68 | } |
69 | 69 | |
70 | 70 | public function destroy($attributeGroupId) |
71 | 71 | { |
72 | - $result = AttributeService::destroyGroup($attributeGroupId); |
|
72 | + $result = AttributeService::destroyGroup($attributeGroupId); |
|
73 | 73 | |
74 | 74 | if ($result) { |
75 | 75 | Notification::success('Attribute group was deleted.'); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | $query = GeneralSettingService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
18 | 18 | |
19 | - $datatables = DataTables::of($query)->addColumn('action', function ($query) { |
|
19 | + $datatables = DataTables::of($query)->addColumn('action', function($query) { |
|
20 | 20 | $deleteLink = Form::deleteajax(url()->route('general-setting.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
21 | 21 | $links = '<a href="'.url()->route('general-setting.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
22 | 22 | return $links; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function store(Request $request) |
37 | 37 | { |
38 | - $result = GeneralSettingService::create($request->all()); |
|
38 | + $result = GeneralSettingService::create($request->all()); |
|
39 | 39 | return GeneralSettingService::notificationRedirect('general-setting.index', $result, 'The general setting was inserted.'); |
40 | 40 | } |
41 | 41 | |
@@ -46,13 +46,13 @@ discard block |
||
46 | 46 | |
47 | 47 | public function update(Request $request, $generalSettingId) |
48 | 48 | { |
49 | - $result = GeneralSettingService::updateById($request->all(), $generalSettingId); |
|
49 | + $result = GeneralSettingService::updateById($request->all(), $generalSettingId); |
|
50 | 50 | return GeneralSettingService::notificationRedirect('general-setting.index', $result, 'The general setting was updated.'); |
51 | 51 | } |
52 | 52 | |
53 | 53 | public function destroy($generalSettingId) |
54 | 54 | { |
55 | - $result = GeneralSettingService::destroy($generalSettingId); |
|
55 | + $result = GeneralSettingService::destroy($generalSettingId); |
|
56 | 56 | if ($result) { |
57 | 57 | Notification::error('The general setting was deleted.'); |
58 | 58 | return redirect()->route('general-setting.index'); |