@@ -44,15 +44,15 @@ discard block |
||
44 | 44 | |
45 | 45 | $datatables = \Datatables::of($invoice) |
46 | 46 | |
47 | - ->addColumn('price_with_tax', function ($order) { |
|
47 | + ->addColumn('price_with_tax', function($order) { |
|
48 | 48 | $money = '€ '.$order->price_with_tax; |
49 | 49 | return $money; |
50 | 50 | }) |
51 | 51 | |
52 | 52 | |
53 | 53 | |
54 | - ->addColumn('action', function ($invoice) { |
|
55 | - $deleteLink = \Form::deleteajax('/invoice/'. $invoice->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
54 | + ->addColumn('action', function($invoice) { |
|
55 | + $deleteLink = \Form::deleteajax('/invoice/'.$invoice->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
56 | 56 | $download = '<a href="/invoice/'.$invoice->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a> '; |
57 | 57 | $links = '<a href="/invoice/'.$invoice->id.'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a> '.$download; |
58 | 58 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | public function store() |
92 | 92 | { |
93 | - $result = $this->invoice->create(Request::all()); |
|
93 | + $result = $this->invoice->create(Request::all()); |
|
94 | 94 | |
95 | 95 | if (isset($result->id)) { |
96 | 96 | \Notification::success('The invoice was inserted.'); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | public function update($invoiceId) |
114 | 114 | { |
115 | - $result = $this->invoice->updateById(Request::all(), $invoiceId); |
|
115 | + $result = $this->invoice->updateById(Request::all(), $invoiceId); |
|
116 | 116 | |
117 | 117 | if (isset($result->id)) { |
118 | 118 | \Notification::success('The invoice was updated.'); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | public function destroy($invoiceId) |
127 | 127 | { |
128 | - $result = $this->invoice->destroy($invoiceId); |
|
128 | + $result = $this->invoice->destroy($invoiceId); |
|
129 | 129 | |
130 | 130 | if ($result) { |
131 | 131 | Notification::success('The invoice was deleted.'); |
@@ -26,18 +26,18 @@ discard block |
||
26 | 26 | if ($request->wantsJson()) { |
27 | 27 | |
28 | 28 | $productCategory = ProductCategoryService::getModel()->select( |
29 | - ['id', 'active','shop_id','parent_id', 'redirect_product_category_id','title', 'meta_title', 'meta_description'] |
|
29 | + ['id', 'active', 'shop_id', 'parent_id', 'redirect_product_category_id', 'title', 'meta_title', 'meta_description'] |
|
30 | 30 | )->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
31 | 31 | |
32 | 32 | $datatables = Datatables::of($productCategory) |
33 | 33 | |
34 | - ->addColumn('image', function ($productCategory) { |
|
34 | + ->addColumn('image', function($productCategory) { |
|
35 | 35 | if ($productCategory->productCategoryImages->count()) { |
36 | 36 | return '<img src="/files/product_category/100x100/'.$productCategory->id.'/'.$productCategory->productCategoryImages->first()->file.'" />'; |
37 | 37 | } |
38 | 38 | }) |
39 | 39 | |
40 | - ->addColumn('title', function ($productCategory) { |
|
40 | + ->addColumn('title', function($productCategory) { |
|
41 | 41 | |
42 | 42 | $categoryTitle = $productCategory->title; |
43 | 43 | if ($productCategory->refProductCategory) { |
@@ -51,17 +51,17 @@ discard block |
||
51 | 51 | return $categoryTitle; |
52 | 52 | }) |
53 | 53 | |
54 | - ->addColumn('products', function ($productCategory) { |
|
54 | + ->addColumn('products', function($productCategory) { |
|
55 | 55 | return $productCategory->products->count(); |
56 | 56 | }) |
57 | - ->addColumn('parent', function ($productCategory) { |
|
57 | + ->addColumn('parent', function($productCategory) { |
|
58 | 58 | |
59 | 59 | if ($productCategory->parent()->count()) { |
60 | 60 | return $productCategory->parent()->first()->title; |
61 | 61 | } |
62 | 62 | }) |
63 | 63 | |
64 | - ->addColumn('active', function ($product) { |
|
64 | + ->addColumn('active', function($product) { |
|
65 | 65 | if ($product->active) { |
66 | 66 | return '<a href="#" class="change-active" data-url="/admin/product-category/change-active/'.$product->id.'"><span class="glyphicon glyphicon-ok icon-green"></span></a>'; |
67 | 67 | } |
@@ -70,12 +70,12 @@ discard block |
||
70 | 70 | }) |
71 | 71 | |
72 | 72 | |
73 | - ->addColumn('seo', function ($productCategory) { |
|
73 | + ->addColumn('seo', function($productCategory) { |
|
74 | 74 | if ($productCategory->meta_title && $productCategory->meta_description) { |
75 | 75 | return '<i class="fa fa-check"></i>'; |
76 | 76 | } |
77 | 77 | }) |
78 | - ->addColumn('action', function ($productCategory) { |
|
78 | + ->addColumn('action', function($productCategory) { |
|
79 | 79 | $deleteLink = Form::deleteajax(url()->route('product-category.destroy', $productCategory->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $productCategory->title); |
80 | 80 | $links = '<a href="'.url()->route('product-category.edit', $productCategory->id).'" class="btn btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
81 | 81 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | public function store(Request $request) |
138 | 138 | { |
139 | - $result = ProductCategoryService::create($this->generateInput($request->all())); |
|
139 | + $result = ProductCategoryService::create($this->generateInput($request->all())); |
|
140 | 140 | return ProductCategoryService::notificationRedirect('product-category.index', $result, 'The product category was inserted.'); |
141 | 141 | } |
142 | 142 | |
@@ -160,13 +160,13 @@ discard block |
||
160 | 160 | |
161 | 161 | public function update(Request $request, $productCategoryId) |
162 | 162 | { |
163 | - $result = ProductCategoryService::updateById($this->generateInput($request->all()), $productCategoryId); |
|
163 | + $result = ProductCategoryService::updateById($this->generateInput($request->all()), $productCategoryId); |
|
164 | 164 | return ProductCategoryService::notificationRedirect('product-category.index', $result, 'The product category was updated.'); |
165 | 165 | } |
166 | 166 | |
167 | 167 | public function destroy($productCategoryId) |
168 | 168 | { |
169 | - $result = ProductCategoryService::destroy($productCategoryId); |
|
169 | + $result = ProductCategoryService::destroy($productCategoryId); |
|
170 | 170 | |
171 | 171 | if ($result) { |
172 | 172 | Notification::success('Category was deleted.'); |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | } elseif ($parent->children()->count()) { |
237 | 237 | $node->makeLastChildOf($parent); |
238 | 238 | foreach ($parent->children()->get() as $key => $row) { |
239 | - $positionKey = $position - 1; |
|
239 | + $positionKey = $position - 1; |
|
240 | 240 | if ($key == $positionKey) { |
241 | 241 | $node->moveToRightOf($row); |
242 | 242 | } |
@@ -25,15 +25,15 @@ discard block |
||
25 | 25 | if ($request->wantsJson()) { |
26 | 26 | |
27 | 27 | $image = ProductCategoryService::getImageModel()->select( |
28 | - ['id','file', 'product_category_id'] |
|
28 | + ['id', 'file', 'product_category_id'] |
|
29 | 29 | )->where('product_category_id', '=', $productCategoryId); |
30 | 30 | |
31 | 31 | $datatables = Datatables::of($image) |
32 | 32 | |
33 | - ->addColumn('thumb', function ($image) use ($productCategoryId) { |
|
33 | + ->addColumn('thumb', function($image) use ($productCategoryId) { |
|
34 | 34 | return '<img src="/files/product_category/100x100/'.$image->product_category_id.'/'.$image->file.'" />'; |
35 | 35 | }) |
36 | - ->addColumn('action', function ($image) use ($productCategoryId) { |
|
36 | + ->addColumn('action', function($image) use ($productCategoryId) { |
|
37 | 37 | $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')); |
38 | 38 | $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; |
39 | 39 | return $links; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | public function store(Request $request, $productCategoryId) |
59 | 59 | { |
60 | - $result = ProductCategoryService::createImage($request->all(), $productCategoryId); |
|
60 | + $result = ProductCategoryService::createImage($request->all(), $productCategoryId); |
|
61 | 61 | return ProductCategoryService::notificationRedirect(array('product-category.images.index', $productCategoryId), $result, 'The category image was inserted.'); |
62 | 62 | } |
63 | 63 | |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | |
70 | 70 | public function update(Request $request, $productCategoryId, $productCategoryImageId) |
71 | 71 | { |
72 | - $result = ProductCategoryService::updateImageById($request->all(), $productCategoryId, $productCategoryImageId); |
|
72 | + $result = ProductCategoryService::updateImageById($request->all(), $productCategoryId, $productCategoryImageId); |
|
73 | 73 | return ProductCategoryService::notificationRedirect(array('product-category.images.index', $productCategoryId), $result, 'The category image was updated.'); |
74 | 74 | } |
75 | 75 | |
76 | 76 | public function destroy($productCategoryId, $productCategoryImageId) |
77 | 77 | { |
78 | - $result = ProductCategoryService::destroyImage($productCategoryImageId); |
|
78 | + $result = ProductCategoryService::destroyImage($productCategoryImageId); |
|
79 | 79 | |
80 | 80 | if ($result) { |
81 | 81 | Notification::success('The file was deleted.'); |
@@ -36,13 +36,13 @@ discard block |
||
36 | 36 | |
37 | 37 | $datatables = Datatables::of($content) |
38 | 38 | |
39 | - ->filterColumn('title', function ($query, $keyword) { |
|
39 | + ->filterColumn('title', function($query, $keyword) { |
|
40 | 40 | $query->whereRaw("content.title like ?", ["%{$keyword}%"]); |
41 | 41 | }) |
42 | - ->addColumn('contentgroup', function ($content) { |
|
42 | + ->addColumn('contentgroup', function($content) { |
|
43 | 43 | return $content->contenttitle; |
44 | 44 | }) |
45 | - ->addColumn('action', function ($content) { |
|
45 | + ->addColumn('action', function($content) { |
|
46 | 46 | $deleteLink = Form::deleteajax(url()->route('content.destroy', $content->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
47 | 47 | $links = '<a href="'.url()->route('content.edit', $content->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
48 | 48 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | public function store(Request $request) |
64 | 64 | { |
65 | - $result = ContentService::create($request->all()); |
|
65 | + $result = ContentService::create($request->all()); |
|
66 | 66 | return ContentService::notificationRedirect('content.index', $result, 'The content was inserted.'); |
67 | 67 | } |
68 | 68 | |
@@ -73,13 +73,13 @@ discard block |
||
73 | 73 | |
74 | 74 | public function update(Request $request, $contentId) |
75 | 75 | { |
76 | - $result = ContentService::updateById($request->all(), $contentId); |
|
76 | + $result = ContentService::updateById($request->all(), $contentId); |
|
77 | 77 | return ContentService::notificationRedirect('content.index', $result, 'The content was updated.'); |
78 | 78 | } |
79 | 79 | |
80 | 80 | public function destroy(Request $request, $contentId) |
81 | 81 | { |
82 | - $result = ContentService::destroy($contentId); |
|
82 | + $result = ContentService::destroy($contentId); |
|
83 | 83 | |
84 | 84 | if ($result) { |
85 | 85 | Notification::success('The content was deleted.'); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | 'value'] |
29 | 29 | )->where('extra_field_id', '=', $extraFieldId); |
30 | 30 | |
31 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) use ($extraFieldId) { |
|
31 | + $datatables = Datatables::of($query)->addColumn('action', function($query) use ($extraFieldId) { |
|
32 | 32 | $deleteLink = Form::deleteajax(url()->route('extra-field.values.destroy', array('ExtraFieldId' => $extraFieldId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
33 | 33 | $links = ' <a href="'.url()->route('extra-field.values.edit', array('ExtraFieldId' => $extraFieldId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> |
34 | 34 | '.$deleteLink; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | public function store(Request $request, $extraFieldId) |
51 | 51 | { |
52 | - $result = ExtraFieldService::createValue($request->all(), $extraFieldId); |
|
52 | + $result = ExtraFieldService::createValue($request->all(), $extraFieldId); |
|
53 | 53 | return ExtraFieldService::notificationRedirect(array('extra-field.values.index', $extraFieldId), $result, 'The extra field was inserted.'); |
54 | 54 | } |
55 | 55 | |
@@ -60,13 +60,13 @@ discard block |
||
60 | 60 | |
61 | 61 | public function update(Request $request, $extraFieldId, $id) |
62 | 62 | { |
63 | - $result = ExtraFieldService::updateValueById($request->all(), $extraFieldId, $id); |
|
63 | + $result = ExtraFieldService::updateValueById($request->all(), $extraFieldId, $id); |
|
64 | 64 | return ExtraFieldService::notificationRedirect(array('extra-field.values.index', $extraFieldId), $result, 'The extra field was updated.'); |
65 | 65 | } |
66 | 66 | |
67 | 67 | public function destroy($extraFieldId, $id) |
68 | 68 | { |
69 | - $result = ExtraFieldService::destroyValue($id); |
|
69 | + $result = ExtraFieldService::destroyValue($id); |
|
70 | 70 | |
71 | 71 | if ($result) { |
72 | 72 | Notification::success('Extra field was deleted.'); |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | |
33 | 33 | $datatables = Datatables::of($image) |
34 | 34 | |
35 | - ->addColumn('thumb', function ($image) use ($contentId) { |
|
35 | + ->addColumn('thumb', function($image) use ($contentId) { |
|
36 | 36 | return '<img src="/files/content/100x100/'.$image->content_id.'/'.$image->file.'" />'; |
37 | 37 | }) |
38 | - ->addColumn('action', function ($image) use ($contentId) { |
|
39 | - $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'. $image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
38 | + ->addColumn('action', function($image) use ($contentId) { |
|
39 | + $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'.$image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
40 | 40 | $links = '<a href="/admin/content/'.$contentId.'/images/'.$image->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
41 | 41 | |
42 | 42 | return $links; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | public function store(Request $request, $contentId) |
58 | 58 | { |
59 | - $result = ContentService::createImage($request->all(), $contentId); |
|
59 | + $result = ContentService::createImage($request->all(), $contentId); |
|
60 | 60 | return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was inserted.'); |
61 | 61 | } |
62 | 62 | |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | |
69 | 69 | public function update(Request $request, $contentId, $contentImageId) |
70 | 70 | { |
71 | - $result = ContentService::updateImageById($request->all(), $contentId, $contentImageId); |
|
71 | + $result = ContentService::updateImageById($request->all(), $contentId, $contentImageId); |
|
72 | 72 | return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was updated.'); |
73 | 73 | } |
74 | 74 | |
75 | 75 | public function destroy($contentId, $contentImageId) |
76 | 76 | { |
77 | - $result = ContentService::destroyImage($contentImageId); |
|
77 | + $result = ContentService::destroyImage($contentImageId); |
|
78 | 78 | |
79 | 79 | if ($result) { |
80 | 80 | Notification::success('The file was deleted.'); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | 'name', 'value'] |
22 | 22 | )->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
23 | 23 | |
24 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) { |
|
24 | + $datatables = Datatables::of($query)->addColumn('action', function($query) { |
|
25 | 25 | $deleteLink = Form::deleteajax(url()->route('general-setting.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
26 | 26 | $links = '<a href="'.url()->route('general-setting.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
27 | 27 | return $links; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | public function store(Request $request) |
42 | 42 | { |
43 | - $result = GeneralSettingService::create($request->all()); |
|
43 | + $result = GeneralSettingService::create($request->all()); |
|
44 | 44 | return GeneralSettingService::notificationRedirect('general-setting.index', $result, 'The general setting was inserted.'); |
45 | 45 | } |
46 | 46 | |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | |
52 | 52 | public function update(Request $request, $generalSettingId) |
53 | 53 | { |
54 | - $result = GeneralSettingService::updateById($request->all(), $generalSettingId); |
|
54 | + $result = GeneralSettingService::updateById($request->all(), $generalSettingId); |
|
55 | 55 | return GeneralSettingService::notificationRedirect('general-setting.index', $result, 'The general setting was updated.'); |
56 | 56 | } |
57 | 57 | |
58 | 58 | public function destroy($generalSettingId) |
59 | 59 | { |
60 | - $result = GeneralSettingService::destroy($generalSettingId); |
|
60 | + $result = GeneralSettingService::destroy($generalSettingId); |
|
61 | 61 | if ($result) { |
62 | 62 | Notification::error('The general setting was deleted.'); |
63 | 63 | return redirect()->route('general-setting.index'); |
@@ -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.'); |
@@ -21,10 +21,10 @@ discard block |
||
21 | 21 | { |
22 | 22 | if ($request->wantsJson()) { |
23 | 23 | $brand = BrandService::getModel() |
24 | - ->select(['id', 'rank','title']) |
|
24 | + ->select(['id', 'rank', 'title']) |
|
25 | 25 | ->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
26 | 26 | |
27 | - $datatables = Datatables::of($brand)->addColumn('action', function ($query) { |
|
27 | + $datatables = Datatables::of($brand)->addColumn('action', function($query) { |
|
28 | 28 | $deleteLink = Form::deleteajax(url()->route('brand.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'), $query->title); |
29 | 29 | $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; |
30 | 30 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | public function store(Request $request) |
46 | 46 | { |
47 | - $result = BrandService::create($request->all()); |
|
47 | + $result = BrandService::create($request->all()); |
|
48 | 48 | return BrandService::notificationRedirect('brand.index', $result, 'The brand was inserted.'); |
49 | 49 | } |
50 | 50 | |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | |
56 | 56 | public function update(Request $request, $brandId) |
57 | 57 | { |
58 | - $result = BrandService::updateById($request->all(), $brandId); |
|
58 | + $result = BrandService::updateById($request->all(), $brandId); |
|
59 | 59 | return BrandService::notificationRedirect('brand.index', $result, 'The brand was updated.'); |
60 | 60 | } |
61 | 61 | |
62 | 62 | public function destroy($brandId) |
63 | 63 | { |
64 | - $result = BrandService::destroy($brandId); |
|
64 | + $result = BrandService::destroy($brandId); |
|
65 | 65 | if ($result) { |
66 | 66 | Notification::error('The brand was deleted.'); |
67 | 67 | return redirect()->route('brand.index'); |