@@ -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'); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | if ($request->wantsJson()) { |
23 | 23 | $brand = BrandService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
24 | 24 | |
25 | - $datatables = DataTables::of($brand)->addColumn('action', function ($query) { |
|
25 | + $datatables = DataTables::of($brand)->addColumn('action', function($query) { |
|
26 | 26 | $deleteLink = Form::deleteajax(url()->route('brand.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'), $query->title); |
27 | 27 | $links = '<a href="'.url()->route('brand.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
28 | 28 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | public function store(Request $request) |
44 | 44 | { |
45 | - $result = BrandService::create($request->all()); |
|
45 | + $result = BrandService::create($request->all()); |
|
46 | 46 | return BrandService::notificationRedirect('brand.index', $result, 'The brand was inserted.'); |
47 | 47 | } |
48 | 48 | |
@@ -53,13 +53,13 @@ discard block |
||
53 | 53 | |
54 | 54 | public function update(Request $request, $brandId) |
55 | 55 | { |
56 | - $result = BrandService::updateById($request->all(), $brandId); |
|
56 | + $result = BrandService::updateById($request->all(), $brandId); |
|
57 | 57 | return BrandService::notificationRedirect('brand.index', $result, 'The brand was updated.'); |
58 | 58 | } |
59 | 59 | |
60 | 60 | public function destroy($brandId) |
61 | 61 | { |
62 | - $result = BrandService::destroy($brandId); |
|
62 | + $result = BrandService::destroy($brandId); |
|
63 | 63 | if ($result) { |
64 | 64 | Notification::error('The brand was deleted.'); |
65 | 65 | return redirect()->route('brand.index'); |
@@ -25,13 +25,13 @@ discard block |
||
25 | 25 | $query = ProductRelatedProductService::getModel()->where('product_id', '=', $productId); |
26 | 26 | |
27 | 27 | $datatables = \DataTables::of($query) |
28 | - ->addColumn('related', function ($query) use ($productId) { |
|
28 | + ->addColumn('related', function($query) use ($productId) { |
|
29 | 29 | return $query->RelatedProduct->title; |
30 | 30 | }) |
31 | - ->addColumn('product', function ($query) use ($productId) { |
|
31 | + ->addColumn('product', function($query) use ($productId) { |
|
32 | 32 | return $query->Product->title; |
33 | 33 | }) |
34 | - ->addColumn('action', function ($query) use ($productId) { |
|
34 | + ->addColumn('action', function($query) use ($productId) { |
|
35 | 35 | $deleteLink = \Form::deleteajax(url()->route('product.related-product.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
36 | 36 | |
37 | 37 | return $deleteLink; |
@@ -52,13 +52,13 @@ discard block |
||
52 | 52 | |
53 | 53 | public function store(Request $request, $productId) |
54 | 54 | { |
55 | - $result = ProductRelatedProductService::create($request->all(), $productId); |
|
55 | + $result = ProductRelatedProductService::create($request->all(), $productId); |
|
56 | 56 | return redirect()->route('product.related-product.index', $productId); |
57 | 57 | } |
58 | 58 | |
59 | 59 | public function destroy($productId, $productRelatedProductId) |
60 | 60 | { |
61 | - $result = ProductRelatedProductService::destroy($productRelatedProductId); |
|
61 | + $result = ProductRelatedProductService::destroy($productRelatedProductId); |
|
62 | 62 | |
63 | 63 | if ($result) { |
64 | 64 | Notification::success('The related product is deleted.'); |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | ->where('faq_item.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
35 | 35 | |
36 | 36 | $datatables = DataTables::of($query) |
37 | - ->addColumn('faqitemgroup', function ($query) { |
|
37 | + ->addColumn('faqitemgroup', function($query) { |
|
38 | 38 | return $query->grouptitle; |
39 | 39 | }) |
40 | - ->addColumn('action', function ($query) { |
|
40 | + ->addColumn('action', function($query) { |
|
41 | 41 | $deleteLink = Form::deleteajax(url()->route('faq.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
42 | 42 | $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; |
43 | 43 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | public function store(Request $request) |
60 | 60 | { |
61 | - $result = FaqService::create($request->all()); |
|
61 | + $result = FaqService::create($request->all()); |
|
62 | 62 | return FaqService::notificationRedirect('faq.index', $result, 'FaqItem was inserted.'); |
63 | 63 | } |
64 | 64 | |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | |
71 | 71 | public function update(Request $request, $faqId) |
72 | 72 | { |
73 | - $result = FaqService::updateById($request->all(), $faqId); |
|
73 | + $result = FaqService::updateById($request->all(), $faqId); |
|
74 | 74 | return FaqService::notificationRedirect('faq.index', $result, 'FaqItem was updated.'); |
75 | 75 | } |
76 | 76 | |
77 | 77 | public function destroy($faqItemId) |
78 | 78 | { |
79 | - $result = FaqService::destroy($faqItemId); |
|
79 | + $result = FaqService::destroy($faqItemId); |
|
80 | 80 | |
81 | 81 | if ($result) { |
82 | 82 | Notification::success('The faq was deleted.'); |
@@ -27,22 +27,22 @@ discard block |
||
27 | 27 | |
28 | 28 | $datatables = DataTables::of($query) |
29 | 29 | |
30 | - ->addColumn('orderconfirmed', function ($query) { |
|
30 | + ->addColumn('orderconfirmed', function($query) { |
|
31 | 31 | if ($query->orderConfirmedOrderStatus) { |
32 | 32 | return $query->orderConfirmedOrderStatus->title; |
33 | 33 | } |
34 | 34 | }) |
35 | - ->addColumn('paymentcompleted', function ($query) { |
|
35 | + ->addColumn('paymentcompleted', function($query) { |
|
36 | 36 | if ($query->orderPaymentCompletedOrderStatus) { |
37 | 37 | return $query->orderPaymentCompletedOrderStatus->title; |
38 | 38 | } |
39 | 39 | }) |
40 | - ->addColumn('paymentfailed', function ($query) { |
|
40 | + ->addColumn('paymentfailed', function($query) { |
|
41 | 41 | if ($query->orderPaymentFailedOrderStatus) { |
42 | 42 | return $query->orderPaymentFailedOrderStatus->title; |
43 | 43 | } |
44 | 44 | }) |
45 | - ->addColumn('action', function ($query) { |
|
45 | + ->addColumn('action', function($query) { |
|
46 | 46 | $deleteLink = Form::deleteajax(url()->route('payment-method.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
47 | 47 | $links = '<a href="'.url()->route('payment-method.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
48 | 48 | return $links; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | public function store(Request $request) |
69 | 69 | { |
70 | - $result = PaymentMethodService::create($request->all()); |
|
70 | + $result = PaymentMethodService::create($request->all()); |
|
71 | 71 | return PaymentMethodService::notificationRedirect('payment-method.index', $result, 'The payment method was inserted.'); |
72 | 72 | } |
73 | 73 | |
@@ -84,13 +84,13 @@ discard block |
||
84 | 84 | |
85 | 85 | public function update(Request $request, $paymentMethodId) |
86 | 86 | { |
87 | - $result = PaymentMethodService::updateById($request->all(), $paymentMethodId); |
|
87 | + $result = PaymentMethodService::updateById($request->all(), $paymentMethodId); |
|
88 | 88 | return PaymentMethodService::notificationRedirect('payment-method.index', $result, 'The payment method was updated.'); |
89 | 89 | } |
90 | 90 | |
91 | 91 | public function destroy($paymentMethodId) |
92 | 92 | { |
93 | - $result = PaymentMethodService::destroy($paymentMethodId); |
|
93 | + $result = PaymentMethodService::destroy($paymentMethodId); |
|
94 | 94 | |
95 | 95 | if ($result) { |
96 | 96 | Notification::success('The payment method was deleted.'); |