@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | if ($request->wantsJson()) { |
25 | 25 | $query = SendingMethodService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
26 | 26 | |
27 | - $datatables = DataTables::of($query)->addColumn('action', function ($query) { |
|
27 | + $datatables = DataTables::of($query)->addColumn('action', function($query) { |
|
28 | 28 | $deleteLink = Form::deleteajax(url()->route('sending-method.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $query->title); |
29 | 29 | $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; |
30 | 30 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public function store(Request $request) |
50 | 50 | { |
51 | - $result = SendingMethodService::create($request->all()); |
|
51 | + $result = SendingMethodService::create($request->all()); |
|
52 | 52 | return SendingMethodService::notificationRedirect('sending-method.index', $result, 'The sending method was inserted.'); |
53 | 53 | } |
54 | 54 | |
@@ -65,13 +65,13 @@ discard block |
||
65 | 65 | |
66 | 66 | public function update(Request $request, $sendingMethodId) |
67 | 67 | { |
68 | - $result = SendingMethodService::updateById($request->all(), $sendingMethodId); |
|
68 | + $result = SendingMethodService::updateById($request->all(), $sendingMethodId); |
|
69 | 69 | return SendingMethodService::notificationRedirect('sending-method.index', $result, 'The sending method was updated.'); |
70 | 70 | } |
71 | 71 | |
72 | 72 | public function destroy($sendingMethodId) |
73 | 73 | { |
74 | - $result = SendingMethodService::destroy($sendingMethodId); |
|
74 | + $result = SendingMethodService::destroy($sendingMethodId); |
|
75 | 75 | |
76 | 76 | if ($result) { |
77 | 77 | flash('The sending method was deleted.'); |
@@ -23,11 +23,11 @@ discard block |
||
23 | 23 | $query = RedirectService::selectAll(); |
24 | 24 | $datatables = DataTables::of($query) |
25 | 25 | |
26 | - ->addColumn('url', function ($query) { |
|
26 | + ->addColumn('url', function($query) { |
|
27 | 27 | return '<a href="'.$query->url.'" target="_blank">'.$query->url.'</a>'; |
28 | 28 | }) |
29 | 29 | |
30 | - ->addColumn('action', function ($query) { |
|
30 | + ->addColumn('action', function($query) { |
|
31 | 31 | $deleteLink = \Form::deleteajax(url()->route('redirect.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
32 | 32 | $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; |
33 | 33 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | public function store() |
51 | 51 | { |
52 | - $result = RedirectService::create($request->all()); |
|
52 | + $result = RedirectService::create($request->all()); |
|
53 | 53 | return RedirectService::notificationRedirect('redirect.index', $result, 'The redirect was inserted.'); |
54 | 54 | } |
55 | 55 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | public function postImport() |
71 | 71 | { |
72 | 72 | $file = $request->file('file'); |
73 | - Excel::load($file, function ($reader) { |
|
73 | + Excel::load($file, function($reader) { |
|
74 | 74 | |
75 | 75 | $results = $reader->get(); |
76 | 76 | |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | |
90 | 90 | public function getExport() |
91 | 91 | { |
92 | - $result = RedirectService::selectAll(); |
|
92 | + $result = RedirectService::selectAll(); |
|
93 | 93 | |
94 | - Excel::create('redirects', function ($excel) use ($result) { |
|
94 | + Excel::create('redirects', function($excel) use ($result) { |
|
95 | 95 | |
96 | - $excel->sheet('Redirects', function ($sheet) use ($result) { |
|
96 | + $excel->sheet('Redirects', function($sheet) use ($result) { |
|
97 | 97 | $newArray = array(); |
98 | 98 | foreach ($result as $row) { |
99 | 99 | $newArray[$row->id] = array( |
@@ -110,13 +110,13 @@ discard block |
||
110 | 110 | |
111 | 111 | public function update($redirectId) |
112 | 112 | { |
113 | - $result = RedirectService::updateById($request->all(), $redirectId); |
|
113 | + $result = RedirectService::updateById($request->all(), $redirectId); |
|
114 | 114 | return RedirectService::notificationRedirect('redirect.index', $result, 'The redirect was updated.'); |
115 | 115 | } |
116 | 116 | |
117 | 117 | public function destroy($redirectId) |
118 | 118 | { |
119 | - $result = RedirectService::destroy($redirectId); |
|
119 | + $result = RedirectService::destroy($redirectId); |
|
120 | 120 | |
121 | 121 | if ($result) { |
122 | 122 | flash('Redirect item is deleted.'); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | $datatables = DataTables::of($query) |
29 | 29 | |
30 | - ->addColumn('category', function ($query) { |
|
30 | + ->addColumn('category', function($query) { |
|
31 | 31 | if ($query->categories) { |
32 | 32 | $output = array(); |
33 | 33 | foreach ($query->categories as $categorie) { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } |
39 | 39 | }) |
40 | 40 | |
41 | - ->addColumn('action', function ($query) { |
|
41 | + ->addColumn('action', function($query) { |
|
42 | 42 | $deleteLink = Form::deleteajax(url()->route('extra-field.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
43 | 43 | $links = '<a href="'.url()->route('extra-field.values.index', $query->id).'" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>'.$query->values->count().' values</a> |
44 | 44 | <a href="'.url()->route('extra-field.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | public function store(Request $request) |
62 | 62 | { |
63 | - $result = ExtraFieldService::create($request->all()); |
|
63 | + $result = ExtraFieldService::create($request->all()); |
|
64 | 64 | return ExtraFieldService::notificationRedirect('extra-field.index', $result, 'The extra field was inserted.'); |
65 | 65 | } |
66 | 66 | |
@@ -71,13 +71,13 @@ discard block |
||
71 | 71 | |
72 | 72 | public function update(Request $request, $id) |
73 | 73 | { |
74 | - $result = ExtraFieldService::updateById($request->all(), $id); |
|
74 | + $result = ExtraFieldService::updateById($request->all(), $id); |
|
75 | 75 | return ExtraFieldService::notificationRedirect('extra-field.index', $result, 'The extra field was updated.'); |
76 | 76 | } |
77 | 77 | |
78 | 78 | public function destroy($id) |
79 | 79 | { |
80 | - $result = ExtraFieldService::destroy($id); |
|
80 | + $result = ExtraFieldService::destroy($id); |
|
81 | 81 | |
82 | 82 | if ($result) { |
83 | 83 | flash('Extra field was deleted.'); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $query = AttributeService::getModel()->where('attribute_group_id', '=', $attributeGroupId); |
31 | 31 | |
32 | 32 | $datatables = DataTables::of($query) |
33 | - ->addColumn('action', function ($query) use ($attributeGroupId) { |
|
33 | + ->addColumn('action', function($query) use ($attributeGroupId) { |
|
34 | 34 | $deleteLink = Form::deleteajax(url()->route('attribute.destroy', array('attributeGroupId' => $attributeGroupId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
35 | 35 | $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; |
36 | 36 | return $links; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function store(Request $request, $attributeGroupId) |
63 | 63 | { |
64 | - $result = AttributeService::create($request->all(), $attributeGroupId); |
|
64 | + $result = AttributeService::create($request->all(), $attributeGroupId); |
|
65 | 65 | return AttributeService::notificationRedirect(array('attribute.index', $attributeGroupId), $result, 'The attribute was inserted.'); |
66 | 66 | } |
67 | 67 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function update(Request $request, $attributeGroupId, $attributeId) |
87 | 87 | { |
88 | - $result = AttributeService::updateById($request->all(), $attributeGroupId, $attributeId); |
|
88 | + $result = AttributeService::updateById($request->all(), $attributeGroupId, $attributeId); |
|
89 | 89 | return AttributeService::notificationRedirect(array('attribute.index', $attributeGroupId), $result, 'The attribute was updated.'); |
90 | 90 | } |
91 | 91 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function destroy($attributeGroupId, $attributeId) |
99 | 99 | { |
100 | - $result = AttributeService::destroy($attributeId); |
|
100 | + $result = AttributeService::destroy($attributeId); |
|
101 | 101 | |
102 | 102 | if ($result) { |
103 | 103 | flash('Atrribute was deleted.'); |
@@ -26,22 +26,22 @@ discard block |
||
26 | 26 | |
27 | 27 | $datatables = DataTables::of($query) |
28 | 28 | |
29 | - ->addColumn('orderconfirmed', function ($query) { |
|
29 | + ->addColumn('orderconfirmed', function($query) { |
|
30 | 30 | if ($query->orderConfirmedOrderStatus) { |
31 | 31 | return $query->orderConfirmedOrderStatus->title; |
32 | 32 | } |
33 | 33 | }) |
34 | - ->addColumn('paymentcompleted', function ($query) { |
|
34 | + ->addColumn('paymentcompleted', function($query) { |
|
35 | 35 | if ($query->orderPaymentCompletedOrderStatus) { |
36 | 36 | return $query->orderPaymentCompletedOrderStatus->title; |
37 | 37 | } |
38 | 38 | }) |
39 | - ->addColumn('paymentfailed', function ($query) { |
|
39 | + ->addColumn('paymentfailed', function($query) { |
|
40 | 40 | if ($query->orderPaymentFailedOrderStatus) { |
41 | 41 | return $query->orderPaymentFailedOrderStatus->title; |
42 | 42 | } |
43 | 43 | }) |
44 | - ->addColumn('action', function ($query) { |
|
44 | + ->addColumn('action', function($query) { |
|
45 | 45 | $deleteLink = Form::deleteajax(url()->route('payment-method.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
46 | 46 | $links = '<a href="'.url()->route('payment-method.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
47 | 47 | return $links; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | public function store(Request $request) |
68 | 68 | { |
69 | - $result = PaymentMethodService::create($request->all()); |
|
69 | + $result = PaymentMethodService::create($request->all()); |
|
70 | 70 | return PaymentMethodService::notificationRedirect('payment-method.index', $result, 'The payment method was inserted.'); |
71 | 71 | } |
72 | 72 | |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | |
84 | 84 | public function update(Request $request, $paymentMethodId) |
85 | 85 | { |
86 | - $result = PaymentMethodService::updateById($request->all(), $paymentMethodId); |
|
86 | + $result = PaymentMethodService::updateById($request->all(), $paymentMethodId); |
|
87 | 87 | return PaymentMethodService::notificationRedirect('payment-method.index', $result, 'The payment method was updated.'); |
88 | 88 | } |
89 | 89 | |
90 | 90 | public function destroy($paymentMethodId) |
91 | 91 | { |
92 | - $result = PaymentMethodService::destroy($paymentMethodId); |
|
92 | + $result = PaymentMethodService::destroy($paymentMethodId); |
|
93 | 93 | |
94 | 94 | if ($result) { |
95 | 95 | flash('The payment method was deleted.'); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | ->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
27 | 27 | |
28 | 28 | $datatables = DataTables::of($query) |
29 | - ->addColumn('action', function ($query) { |
|
29 | + ->addColumn('action', function($query) { |
|
30 | 30 | $deleteLink = Form::deleteajax(url()->route('content-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
31 | 31 | $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; |
32 | 32 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | public function store(Request $request) |
48 | 48 | { |
49 | - $result = ContentService::createGroup($request->all()); |
|
49 | + $result = ContentService::createGroup($request->all()); |
|
50 | 50 | return ContentService::notificationRedirect('content-group.index', $result, 'The content group was inserted.'); |
51 | 51 | } |
52 | 52 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | public function update(Request $request, $contentGroupId) |
59 | 59 | { |
60 | - $result = ContentService::updateGroupById($request->all(), $contentGroupId); |
|
60 | + $result = ContentService::updateGroupById($request->all(), $contentGroupId); |
|
61 | 61 | return ContentService::notificationRedirect('content-group.index', $result, 'The content group was updated.'); |
62 | 62 | } |
63 | 63 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function destroy($contentGroupId) |
70 | 70 | { |
71 | - $result = ContentService::destroyGroup($contentGroupId); |
|
71 | + $result = ContentService::destroyGroup($contentGroupId); |
|
72 | 72 | |
73 | 73 | if ($result) { |
74 | 74 | flash('The content was deleted.'); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | if ($request->wantsJson()) { |
25 | 25 | $users = SendingMethodService::getCountryModel()->where('sending_method_id', '=', $sendingMethodId); |
26 | 26 | |
27 | - $datatables = \DataTables::of($users)->addColumn('action', function ($users) use ($sendingMethodId) { |
|
27 | + $datatables = \DataTables::of($users)->addColumn('action', function($users) use ($sendingMethodId) { |
|
28 | 28 | $delete = \Form::deleteajax(url()->route('sending-method.country-prices.destroy', array('sendingMethodId' => $sendingMethodId, 'id' => $users->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
29 | 29 | $link = '<a href="'.url()->route('sending-method.country-prices.edit', array('sendingMethodId' => $sendingMethodId, 'id' => $users->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$delete; |
30 | 30 | |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | $countries = \Excel::load($file, function($reader) { |
60 | 60 | })->get(); |
61 | 61 | |
62 | - if($countries) { |
|
63 | - $result = SendingMethodService::importCountries($countries, $request->get('tax_rate_id'), $sendingMethodId); |
|
62 | + if ($countries) { |
|
63 | + $result = SendingMethodService::importCountries($countries, $request->get('tax_rate_id'), $sendingMethodId); |
|
64 | 64 | flash('The countries are inserted.'); |
65 | 65 | return redirect()->route('sending-method.country-prices.index', $sendingMethodId); |
66 | 66 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | public function store(Request $request, $sendingMethodId) |
70 | 70 | { |
71 | - $result = SendingMethodService::createCountry($request->all(), $sendingMethodId); |
|
71 | + $result = SendingMethodService::createCountry($request->all(), $sendingMethodId); |
|
72 | 72 | return SendingMethodService::notificationRedirect(array('sending-method.country-prices.index', $sendingMethodId), $result, 'The country was inserted.'); |
73 | 73 | } |
74 | 74 | |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | |
84 | 84 | public function update(Request $request, $sendingMethodId, $id) |
85 | 85 | { |
86 | - $result = SendingMethodService::updateCountryById($request->all(), $id); |
|
86 | + $result = SendingMethodService::updateCountryById($request->all(), $id); |
|
87 | 87 | return SendingMethodService::notificationRedirect(array('sending-method.country-prices.index', $sendingMethodId), $result, 'The country was updated.'); |
88 | 88 | } |
89 | 89 | |
90 | 90 | public function destroy($sendingMethodId, $id) |
91 | 91 | { |
92 | - $result = SendingMethodService::destroyCountry($id); |
|
92 | + $result = SendingMethodService::destroyCountry($id); |
|
93 | 93 | |
94 | 94 | if ($result) { |
95 | 95 | flash('The country price was deleted.'); |
@@ -25,10 +25,10 @@ discard block |
||
25 | 25 | |
26 | 26 | $datatables = DataTables::of($image) |
27 | 27 | |
28 | - ->addColumn('thumb', function ($image) use ($productCategoryId) { |
|
28 | + ->addColumn('thumb', function($image) use ($productCategoryId) { |
|
29 | 29 | return '<img src="/files/product_category/100x100/'.$image->product_category_id.'/'.$image->file.'" />'; |
30 | 30 | }) |
31 | - ->addColumn('action', function ($image) use ($productCategoryId) { |
|
31 | + ->addColumn('action', function($image) use ($productCategoryId) { |
|
32 | 32 | $deleteLink = Form::deleteajax(url()->route('product-category.images.destroy', array('productCategoryId' => $productCategoryId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
33 | 33 | $links = '<a href="'.url()->route('product-category.images.edit', array('productCategoryId' => $productCategoryId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
34 | 34 | return $links; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public function store(Request $request, $productCategoryId) |
50 | 50 | { |
51 | - $result = ProductCategoryService::createImage($request->all(), $productCategoryId); |
|
51 | + $result = ProductCategoryService::createImage($request->all(), $productCategoryId); |
|
52 | 52 | return ProductCategoryService::notificationRedirect(array('product-category.images.index', $productCategoryId), $result, 'The category image was inserted.'); |
53 | 53 | } |
54 | 54 | |
@@ -60,13 +60,13 @@ discard block |
||
60 | 60 | |
61 | 61 | public function update(Request $request, $productCategoryId, $productCategoryImageId) |
62 | 62 | { |
63 | - $result = ProductCategoryService::updateImageById($request->all(), $productCategoryId, $productCategoryImageId); |
|
63 | + $result = ProductCategoryService::updateImageById($request->all(), $productCategoryId, $productCategoryImageId); |
|
64 | 64 | return ProductCategoryService::notificationRedirect(array('product-category.images.index', $productCategoryId), $result, 'The category image was updated.'); |
65 | 65 | } |
66 | 66 | |
67 | 67 | public function destroy($productCategoryId, $productCategoryImageId) |
68 | 68 | { |
69 | - $result = ProductCategoryService::destroyImage($productCategoryImageId); |
|
69 | + $result = ProductCategoryService::destroyImage($productCategoryImageId); |
|
70 | 70 | |
71 | 71 | if ($result) { |
72 | 72 | flash('The file was deleted.'); |