@@ -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="'.config('hideyo.public_path').'/brand/100x100/'.$image->brand_id.'/'.$image->file.'" />'; |
| 31 | 31 | }) |
| 32 | - ->addColumn('action', function ($image) use ($brandId) { |
|
| 32 | + ->addColumn('action', function($image) use ($brandId) { |
|
| 33 | 33 | $deleteLink = Form::deleteajax(url()->route('brand.images.destroy', array('brandId' => $brandId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 34 | 34 | $links = '<a href="'.url()->route('brand.images.edit', array('brandId' => $brandId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 35 | 35 | return $links; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | return $datatables->make(true); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - return view('backend.brand_image.index')->with(array( 'brand' => $brand)); |
|
| 41 | + return view('backend.brand_image.index')->with(array('brand' => $brand)); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public function create($brandId) |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | public function store(Request $request, $brandId) |
| 51 | 51 | { |
| 52 | - $result = BrandService::createImage($request->all(), $brandId); |
|
| 52 | + $result = BrandService::createImage($request->all(), $brandId); |
|
| 53 | 53 | return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was inserted.'); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -61,13 +61,13 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | public function update(Request $request, $brandId, $brandImageId) |
| 63 | 63 | { |
| 64 | - $result = BrandService::updateImageById($request->all(), $brandId, $brandImageId); |
|
| 64 | + $result = BrandService::updateImageById($request->all(), $brandId, $brandImageId); |
|
| 65 | 65 | return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was updated.'); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | public function destroy($brandId, $brandImageId) |
| 69 | 69 | { |
| 70 | - $result = BrandService::destroyImage($brandImageId); |
|
| 70 | + $result = BrandService::destroyImage($brandImageId); |
|
| 71 | 71 | |
| 72 | 72 | if ($result) { |
| 73 | 73 | Notification::success('The file was deleted.'); |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | $query = OrderStatusEmailTemplateService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 25 | 25 | |
| 26 | 26 | $datatables = Datatables::of($query) |
| 27 | - ->addColumn('action', function ($query) { |
|
| 28 | - $deleteLink = Form::deleteajax('/admin/order-status-email-template/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 27 | + ->addColumn('action', function($query) { |
|
| 28 | + $deleteLink = Form::deleteajax('/admin/order-status-email-template/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 29 | 29 | $links = '<a href="/admin/order-status-email-template/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 30 | 30 | |
| 31 | 31 | return $links; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function store(Request $request) |
| 46 | 46 | { |
| 47 | - $result = OrderStatusEmailTemplateService::create($request->all()); |
|
| 47 | + $result = OrderStatusEmailTemplateService::create($request->all()); |
|
| 48 | 48 | return OrderStatusEmailTemplateService::notificationRedirect('order-status-email-template.index', $result, 'The template was inserted.'); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -60,13 +60,13 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | public function update(Request $request, $templateId) |
| 62 | 62 | { |
| 63 | - $result = OrderStatusEmailTemplateService::updateById($request->all(), $templateId); |
|
| 63 | + $result = OrderStatusEmailTemplateService::updateById($request->all(), $templateId); |
|
| 64 | 64 | return OrderStatusEmailTemplateService::notificationRedirect('order-status-email-template.index', $result, 'The template was updated.'); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | public function destroy($templateId) |
| 68 | 68 | { |
| 69 | - $result = OrderStatusEmailTemplateService::destroy($templateId); |
|
| 69 | + $result = OrderStatusEmailTemplateService::destroy($templateId); |
|
| 70 | 70 | |
| 71 | 71 | if ($result) { |
| 72 | 72 | Notification::success('template was 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.'); |
@@ -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.'); |