@@ -33,12 +33,12 @@ discard block |
||
| 33 | 33 | ->with(array('couponGroup')); |
| 34 | 34 | |
| 35 | 35 | $datatables = Datatables::of($query) |
| 36 | - ->filterColumn('title', function ($query, $keyword) { |
|
| 36 | + ->filterColumn('title', function($query, $keyword) { |
|
| 37 | 37 | $query->whereRaw("coupon.title like ?", ["%{$keyword}%"]); |
| 38 | 38 | }) |
| 39 | 39 | |
| 40 | - ->addColumn('action', function ($query) { |
|
| 41 | - $deleteLink = Form::deleteajax('/admin/coupon/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 40 | + ->addColumn('action', function($query) { |
|
| 41 | + $deleteLink = Form::deleteajax('/admin/coupon/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 42 | 42 | $links = '<a href="/admin/coupon/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 43 | 43 | |
| 44 | 44 | return $links; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | public function store(Request $request) |
| 65 | 65 | { |
| 66 | - $result = CouponService::create($request->all()); |
|
| 66 | + $result = CouponService::create($request->all()); |
|
| 67 | 67 | return CouponService::notificationRedirect('coupon.index', $result, 'The coupon was inserted.'); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -83,13 +83,13 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | public function update(Request $request, $couponId) |
| 85 | 85 | { |
| 86 | - $result = CouponService::updateById($request->all(), $couponId); |
|
| 86 | + $result = CouponService::updateById($request->all(), $couponId); |
|
| 87 | 87 | return CouponService::notificationRedirect('coupon.index', $result, 'The coupon was updated.'); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | public function destroy($couponId) |
| 91 | 91 | { |
| 92 | - $result = CouponService::destroy($couponId); |
|
| 92 | + $result = CouponService::destroy($couponId); |
|
| 93 | 93 | |
| 94 | 94 | if ($result) { |
| 95 | 95 | Notification::success('The coupon was deleted.'); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | $datatables = \Datatables::of($query) |
| 27 | 27 | |
| 28 | - ->addColumn('title', function ($query) { |
|
| 28 | + ->addColumn('title', function($query) { |
|
| 29 | 29 | |
| 30 | 30 | if ($query->color) { |
| 31 | 31 | return '<span style="background-color:'.$query->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$query->title.'</span>'; |
@@ -34,8 +34,8 @@ discard block |
||
| 34 | 34 | return $query->title; |
| 35 | 35 | }) |
| 36 | 36 | |
| 37 | - ->addColumn('action', function ($query) { |
|
| 38 | - $deleteLink = Form::deleteajax('/admin/order-status/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 37 | + ->addColumn('action', function($query) { |
|
| 38 | + $deleteLink = Form::deleteajax('/admin/order-status/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 39 | 39 | $links = '<a href="/admin/order-status/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 40 | 40 | |
| 41 | 41 | return $links; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | public function store(Request $request) |
| 56 | 56 | { |
| 57 | - $result = OrderStatusService::create($request->all()); |
|
| 57 | + $result = OrderStatusService::create($request->all()); |
|
| 58 | 58 | return OrderStatusService::notificationRedirect('order-status.index', $result, 'The order status was inserted.'); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -75,13 +75,13 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | public function update(Request $request, $orderStatusId) |
| 77 | 77 | { |
| 78 | - $result = OrderStatusService::updateById($request->all(), $orderStatusId); |
|
| 78 | + $result = OrderStatusService::updateById($request->all(), $orderStatusId); |
|
| 79 | 79 | return OrderStatusService::notificationRedirect('order-status.index', $result, 'The order status was updated.'); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | public function destroy($orderStatusId) |
| 83 | 83 | { |
| 84 | - $result = OrderStatusService::destroy($orderStatusId); |
|
| 84 | + $result = OrderStatusService::destroy($orderStatusId); |
|
| 85 | 85 | |
| 86 | 86 | if ($result) { |
| 87 | 87 | Notification::success('The order status 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'); |
@@ -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.'); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $query = CouponService::getGroupModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 25 | 25 | |
| 26 | 26 | $datatables = \Datatables::of($query) |
| 27 | - ->addColumn('action', function ($query) { |
|
| 27 | + ->addColumn('action', function($query) { |
|
| 28 | 28 | $deleteLink = Form::deleteajax(url()->route('coupon-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
| 29 | 29 | $links = '<a href="'.url()->route('coupon-group.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
| 30 | 30 | return $links; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | public function store(Request $request) |
| 45 | 45 | { |
| 46 | - $result = CouponService::createGroup($request->all()); |
|
| 46 | + $result = CouponService::createGroup($request->all()); |
|
| 47 | 47 | return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was inserted.'); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -54,13 +54,13 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | public function update(Request $request, $couponGroupId) |
| 56 | 56 | { |
| 57 | - $result = CouponService::updateGroupById($request->all(), $couponGroupId); |
|
| 57 | + $result = CouponService::updateGroupById($request->all(), $couponGroupId); |
|
| 58 | 58 | return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was updated.'); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | public function destroy($couponGroupId) |
| 62 | 62 | { |
| 63 | - $result = CouponService::destroyGroup($couponGroupId); |
|
| 63 | + $result = CouponService::destroyGroup($couponGroupId); |
|
| 64 | 64 | |
| 65 | 65 | if ($result) { |
| 66 | 66 | Notification::success('The coupon was deleted.'); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | $datatables = Datatables::of($query) |
| 30 | 30 | |
| 31 | - ->addColumn('category', function ($query) { |
|
| 31 | + ->addColumn('category', function($query) { |
|
| 32 | 32 | if ($query->categories) { |
| 33 | 33 | $output = array(); |
| 34 | 34 | foreach ($query->categories as $categorie) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | }) |
| 41 | 41 | |
| 42 | - ->addColumn('action', function ($query) { |
|
| 42 | + ->addColumn('action', function($query) { |
|
| 43 | 43 | $deleteLink = Form::deleteajax(url()->route('extra-field.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 44 | 44 | $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> |
| 45 | 45 | <a href="'.url()->route('extra-field.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | public function store(Request $request) |
| 63 | 63 | { |
| 64 | - $result = ExtraFieldService::create($request->all()); |
|
| 64 | + $result = ExtraFieldService::create($request->all()); |
|
| 65 | 65 | return ExtraFieldService::notificationRedirect('extra-field.index', $result, 'The extra field was inserted.'); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -72,13 +72,13 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | public function update(Request $request, $id) |
| 74 | 74 | { |
| 75 | - $result = ExtraFieldService::updateById($request->all(), $id); |
|
| 75 | + $result = ExtraFieldService::updateById($request->all(), $id); |
|
| 76 | 76 | return ExtraFieldService::notificationRedirect('extra-field.index', $result, 'The extra field was updated.'); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | public function destroy($id) |
| 80 | 80 | { |
| 81 | - $result = ExtraFieldService::destroy($id); |
|
| 81 | + $result = ExtraFieldService::destroy($id); |
|
| 82 | 82 | |
| 83 | 83 | if ($result) { |
| 84 | 84 | Notification::success('Extra field was deleted.'); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $query = NewsService::getGroupModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 24 | 24 | |
| 25 | 25 | $datatables = \Datatables::of($query) |
| 26 | - ->addColumn('action', function ($query) { |
|
| 26 | + ->addColumn('action', function($query) { |
|
| 27 | 27 | $deleteLink = \Form::deleteajax(url()->route('news-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 28 | 28 | $links = '<a href="'.url()->route('news-group.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 29 | 29 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function store(Request $request) |
| 46 | 46 | { |
| 47 | - $result = NewsService::createGroup($request->all()); |
|
| 47 | + $result = NewsService::createGroup($request->all()); |
|
| 48 | 48 | return NewsService::notificationRedirect('news-group.index', $result, 'The news group was inserted.'); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -55,13 +55,13 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | public function update(Request $request, $newsGroupId) |
| 57 | 57 | { |
| 58 | - $result = NewsService::updateGroupById($request->all(), $newsGroupId); |
|
| 58 | + $result = NewsService::updateGroupById($request->all(), $newsGroupId); |
|
| 59 | 59 | return NewsService::notificationRedirect('news-group.index', $result, 'The news group was updated.'); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function destroy($newsGroupId) |
| 63 | 63 | { |
| 64 | - $result = NewsService::destroyGroup($newsGroupId); |
|
| 64 | + $result = NewsService::destroyGroup($newsGroupId); |
|
| 65 | 65 | |
| 66 | 66 | if ($result) { |
| 67 | 67 | Notification::success('The news group was deleted.'); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $query = AttributeService::getModel()->where('attribute_group_id', '=', $attributeGroupId); |
| 33 | 33 | |
| 34 | 34 | $datatables = Datatables::of($query) |
| 35 | - ->addColumn('action', function ($query) use ($attributeGroupId) { |
|
| 35 | + ->addColumn('action', function($query) use ($attributeGroupId) { |
|
| 36 | 36 | $deleteLink = Form::deleteajax(url()->route('attribute.destroy', array('attributeGroupId' => $attributeGroupId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 37 | 37 | $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; |
| 38 | 38 | return $links; |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function store(Request $request, $attributeGroupId) |
| 66 | 66 | { |
| 67 | - $result = AttributeService::create($request->all(), $attributeGroupId); |
|
| 67 | + $result = AttributeService::create($request->all(), $attributeGroupId); |
|
| 68 | 68 | return AttributeService::notificationRedirect(array('attribute.index', $attributeGroupId), $result, 'The attribute was inserted.'); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function update(Request $request, $attributeGroupId, $attributeId) |
| 90 | 90 | { |
| 91 | - $result = AttributeService::updateById($request->all(), $attributeGroupId, $attributeId); |
|
| 91 | + $result = AttributeService::updateById($request->all(), $attributeGroupId, $attributeId); |
|
| 92 | 92 | return AttributeService::notificationRedirect(array('attribute.index', $attributeGroupId), $result, 'The attribute was updated.'); |
| 93 | 93 | } |
| 94 | 94 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function destroy($attributeGroupId, $attributeId) |
| 102 | 102 | { |
| 103 | - $result = AttributeService::destroy($attributeId); |
|
| 103 | + $result = AttributeService::destroy($attributeId); |
|
| 104 | 104 | |
| 105 | 105 | if ($result) { |
| 106 | 106 | Notification::success('Atrribute was deleted.'); |
@@ -26,23 +26,23 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $product = ProductService::find($productId); |
| 28 | 28 | |
| 29 | - if($product) { |
|
| 29 | + if ($product) { |
|
| 30 | 30 | if ($request->wantsJson()) { |
| 31 | 31 | |
| 32 | 32 | $query = ProductCombinationService::getModel()->where('product_id', '=', $productId); |
| 33 | 33 | |
| 34 | - $datatables = \Datatables::of($query)->addColumn('action', function ($query) use ($productId) { |
|
| 34 | + $datatables = \Datatables::of($query)->addColumn('action', function($query) use ($productId) { |
|
| 35 | 35 | $deleteLink = \Form::deleteajax(url()->route('product-combination.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 36 | 36 | $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; |
| 37 | 37 | |
| 38 | 38 | return $links; |
| 39 | 39 | }) |
| 40 | 40 | |
| 41 | - ->addColumn('amount', function ($query) { |
|
| 41 | + ->addColumn('amount', function($query) { |
|
| 42 | 42 | 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.'">'; |
| 43 | 43 | }) |
| 44 | 44 | |
| 45 | - ->addColumn('price', function ($query) { |
|
| 45 | + ->addColumn('price', function($query) { |
|
| 46 | 46 | $result = 0; |
| 47 | 47 | if ($query->price) { |
| 48 | 48 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | 'amount' => $query->amount |
| 92 | 92 | ); |
| 93 | 93 | |
| 94 | - $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
| 94 | + $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
| 95 | 95 | |
| 96 | 96 | |
| 97 | 97 | if ($query->discount_value) { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | return $result; |
| 103 | 103 | }) |
| 104 | 104 | |
| 105 | - ->addColumn('combinations', function ($query) use ($productId) { |
|
| 105 | + ->addColumn('combinations', function($query) use ($productId) { |
|
| 106 | 106 | $items = array(); |
| 107 | 107 | foreach ($query->combinations as $row) { |
| 108 | 108 | $items[] = $row->attribute->attributeGroup->title.': '.$row->attribute->value; |
@@ -147,8 +147,8 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | public function store(Request $request, $productId) |
| 149 | 149 | { |
| 150 | - $result = ProductCombinationService::create($request->all(), $productId); |
|
| 151 | - if($result) { |
|
| 150 | + $result = ProductCombinationService::create($request->all(), $productId); |
|
| 151 | + if ($result) { |
|
| 152 | 152 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product extra fields are updated.'); |
| 153 | 153 | } |
| 154 | 154 | |
@@ -184,14 +184,14 @@ discard block |
||
| 184 | 184 | public function update(Request $request, $productId, $id) |
| 185 | 185 | { |
| 186 | 186 | |
| 187 | - $result = ProductCombinationService::updateById($request->all(), $productId, $id); |
|
| 187 | + $result = ProductCombinationService::updateById($request->all(), $productId, $id); |
|
| 188 | 188 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product combinations are updated.'); |
| 189 | 189 | |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | public function destroy($productId, $id) |
| 193 | 193 | { |
| 194 | - $result = ProductCombinationService::destroy($id); |
|
| 194 | + $result = ProductCombinationService::destroy($id); |
|
| 195 | 195 | |
| 196 | 196 | if ($result) { |
| 197 | 197 | Notification::success('The product combination is deleted.'); |