@@ -25,11 +25,11 @@ discard block |
||
| 25 | 25 | $query = RedirectService::selectAll(); |
| 26 | 26 | $datatables = \DataTables::of($query) |
| 27 | 27 | |
| 28 | - ->addColumn('url', function ($query) { |
|
| 28 | + ->addColumn('url', function($query) { |
|
| 29 | 29 | return '<a href="'.$query->url.'" target="_blank">'.$query->url.'</a>'; |
| 30 | 30 | }) |
| 31 | 31 | |
| 32 | - ->addColumn('action', function ($query) { |
|
| 32 | + ->addColumn('action', function($query) { |
|
| 33 | 33 | $deleteLink = \Form::deleteajax(url()->route('redirect.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 34 | 34 | $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; |
| 35 | 35 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | public function store() |
| 53 | 53 | { |
| 54 | - $result = RedirectService::create(Request::all()); |
|
| 54 | + $result = RedirectService::create(Request::all()); |
|
| 55 | 55 | return RedirectService::notificationRedirect('redirect.index', $result, 'The redirect was inserted.'); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | public function postImport() |
| 73 | 73 | { |
| 74 | 74 | $file = Request::file('file'); |
| 75 | - Excel::load($file, function ($reader) { |
|
| 75 | + Excel::load($file, function($reader) { |
|
| 76 | 76 | |
| 77 | 77 | $results = $reader->get(); |
| 78 | 78 | |
@@ -91,11 +91,11 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | public function getExport() |
| 93 | 93 | { |
| 94 | - $result = RedirectService::selectAll(); |
|
| 94 | + $result = RedirectService::selectAll(); |
|
| 95 | 95 | |
| 96 | - Excel::create('redirects', function ($excel) use ($result) { |
|
| 96 | + Excel::create('redirects', function($excel) use ($result) { |
|
| 97 | 97 | |
| 98 | - $excel->sheet('Redirects', function ($sheet) use ($result) { |
|
| 98 | + $excel->sheet('Redirects', function($sheet) use ($result) { |
|
| 99 | 99 | $newArray = array(); |
| 100 | 100 | foreach ($result as $row) { |
| 101 | 101 | $newArray[$row->id] = array( |
@@ -112,13 +112,13 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | public function update($redirectId) |
| 114 | 114 | { |
| 115 | - $result = RedirectService::updateById(Request::all(), $redirectId); |
|
| 115 | + $result = RedirectService::updateById(Request::all(), $redirectId); |
|
| 116 | 116 | return RedirectService::notificationRedirect('redirect.index', $result, 'The redirect was updated.'); |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | public function destroy($redirectId) |
| 120 | 120 | { |
| 121 | - $result = RedirectService::destroy($redirectId); |
|
| 121 | + $result = RedirectService::destroy($redirectId); |
|
| 122 | 122 | |
| 123 | 123 | if ($result) { |
| 124 | 124 | Notification::success('Redirect item is deleted.'); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | 'name'] |
| 31 | 31 | )->where('sending_method_id', '=', $sendingMethodId); |
| 32 | 32 | |
| 33 | - $datatables = \DataTables::of($users)->addColumn('action', function ($users) use ($sendingMethodId) { |
|
| 33 | + $datatables = \DataTables::of($users)->addColumn('action', function($users) use ($sendingMethodId) { |
|
| 34 | 34 | $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')); |
| 35 | 35 | $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; |
| 36 | 36 | |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | $countries = \Excel::load($file, function($reader) { |
| 66 | 66 | })->get(); |
| 67 | 67 | |
| 68 | - if($countries) { |
|
| 69 | - $result = SendingMethodService::importCountries($countries, $request->get('tax_rate_id'), $sendingMethodId); |
|
| 68 | + if ($countries) { |
|
| 69 | + $result = SendingMethodService::importCountries($countries, $request->get('tax_rate_id'), $sendingMethodId); |
|
| 70 | 70 | Notification::success('The countries are inserted.'); |
| 71 | 71 | return redirect()->route('sending-method.country-prices.index', $sendingMethodId); |
| 72 | 72 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | public function store(Request $request, $sendingMethodId) |
| 76 | 76 | { |
| 77 | - $result = SendingMethodService::createCountry($request->all(), $sendingMethodId); |
|
| 77 | + $result = SendingMethodService::createCountry($request->all(), $sendingMethodId); |
|
| 78 | 78 | return SendingMethodService::notificationRedirect(array('sending-method.country-prices.index', $sendingMethodId), $result, 'The country was inserted.'); |
| 79 | 79 | } |
| 80 | 80 | |
@@ -89,13 +89,13 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | public function update(Request $request, $sendingMethodId, $id) |
| 91 | 91 | { |
| 92 | - $result = SendingMethodService::updateCountryById($request->all(), $id); |
|
| 92 | + $result = SendingMethodService::updateCountryById($request->all(), $id); |
|
| 93 | 93 | return SendingMethodService::notificationRedirect(array('sending-method.country-prices.index', $sendingMethodId), $result, 'The country was updated.'); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | public function destroy($sendingMethodId, $id) |
| 97 | 97 | { |
| 98 | - $result = SendingMethodService::destroyCountry($id); |
|
| 98 | + $result = SendingMethodService::destroyCountry($id); |
|
| 99 | 99 | |
| 100 | 100 | if ($result) { |
| 101 | 101 | Notification::success('The country price 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.'); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | use Hideyo\Ecommerce\Framework\Services\Order\OrderFacade as OrderService; |
| 15 | 15 | use Hideyo\Ecommerce\Framework\Services\Order\OrderStatusFacade as OrderStatusService; |
| 16 | 16 | use Hideyo\Ecommerce\Framework\Services\PaymentMethod\PaymentMethodFacade as PaymentMethodService; |
| 17 | -use Hideyo\Ecommerce\Framework\Services\SendingMethod\SendingMethodFacade as SendingMethodService;use Hideyo\Ecommerce\Framework\Services\Product\ProductFacade as ProductService; |
|
| 17 | +use Hideyo\Ecommerce\Framework\Services\SendingMethod\SendingMethodFacade as SendingMethodService; use Hideyo\Ecommerce\Framework\Services\Product\ProductFacade as ProductService; |
|
| 18 | 18 | |
| 19 | 19 | use Carbon\Carbon; |
| 20 | 20 | use Request; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | public function index() |
| 30 | 30 | { |
| 31 | - $shop = auth('hideyobackend')->user()->shop; |
|
| 31 | + $shop = auth('hideyobackend')->user()->shop; |
|
| 32 | 32 | $now = Carbon::now(); |
| 33 | 33 | |
| 34 | 34 | $revenueThisMonth = null; |
@@ -58,15 +58,15 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | $datatables = \DataTables::of($order) |
| 60 | 60 | |
| 61 | - ->addColumn('generated_custom_order_id', function ($order) { |
|
| 61 | + ->addColumn('generated_custom_order_id', function($order) { |
|
| 62 | 62 | return $order->generated_custom_order_id; |
| 63 | 63 | }) |
| 64 | 64 | |
| 65 | - ->addColumn('created_at', function ($order) { |
|
| 65 | + ->addColumn('created_at', function($order) { |
|
| 66 | 66 | return date('d F H:i', strtotime($order->created_at)); |
| 67 | 67 | }) |
| 68 | 68 | |
| 69 | - ->addColumn('status', function ($order) { |
|
| 69 | + ->addColumn('status', function($order) { |
|
| 70 | 70 | if ($order->orderStatus) { |
| 71 | 71 | if ($order->orderStatus->color) { |
| 72 | 72 | return '<a href="/admin/order/'.$order->id.'" style="text-decoration:none;"><span style="background-color:'.$order->orderStatus->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$order->orderStatus->title.'</span></a>'; |
@@ -75,46 +75,46 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | }) |
| 77 | 77 | |
| 78 | - ->filterColumn('client', function ($query, $keyword) { |
|
| 78 | + ->filterColumn('client', function($query, $keyword) { |
|
| 79 | 79 | |
| 80 | 80 | $query->where( |
| 81 | - function ($query) use ($keyword) { |
|
| 81 | + function($query) use ($keyword) { |
|
| 82 | 82 | $query->whereRaw("order_address.firstname like ?", ["%{$keyword}%"]); |
| 83 | 83 | $query->orWhereRaw("order_address.lastname like ?", ["%{$keyword}%"]); |
| 84 | 84 | ; |
| 85 | 85 | } |
| 86 | 86 | ); |
| 87 | 87 | }) |
| 88 | - ->addColumn('client', function ($order) { |
|
| 88 | + ->addColumn('client', function($order) { |
|
| 89 | 89 | if ($order->client) { |
| 90 | 90 | if ($order->orderBillAddress) { |
| 91 | - return '<a href="/admin/client/'.$order->client_id.'/order">'.$order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname.' ('.$order->client->orders->count() .')</a>'; |
|
| 91 | + return '<a href="/admin/client/'.$order->client_id.'/order">'.$order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname.' ('.$order->client->orders->count().')</a>'; |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | }) |
| 95 | - ->addColumn('products', function ($order) { |
|
| 95 | + ->addColumn('products', function($order) { |
|
| 96 | 96 | if ($order->products) { |
| 97 | 97 | return $order->products->count(); |
| 98 | 98 | } |
| 99 | 99 | }) |
| 100 | - ->addColumn('price_with_tax', function ($order) { |
|
| 100 | + ->addColumn('price_with_tax', function($order) { |
|
| 101 | 101 | $money = '€ '.$order->getPriceWithTaxNumberFormat(); |
| 102 | 102 | return $money; |
| 103 | 103 | }) |
| 104 | 104 | |
| 105 | 105 | |
| 106 | - ->addColumn('paymentMethod', function ($order) { |
|
| 106 | + ->addColumn('paymentMethod', function($order) { |
|
| 107 | 107 | if ($order->orderPaymentMethod) { |
| 108 | 108 | return $order->orderPaymentMethod->title; |
| 109 | 109 | } |
| 110 | 110 | }) |
| 111 | - ->addColumn('sendingMethod', function ($order) { |
|
| 111 | + ->addColumn('sendingMethod', function($order) { |
|
| 112 | 112 | if ($order->orderSendingMethod) { |
| 113 | 113 | return $order->orderSendingMethod->title; |
| 114 | 114 | } |
| 115 | 115 | }) |
| 116 | - ->addColumn('action', function ($order) { |
|
| 117 | - $deleteLink = \Form::deleteajax('/admin/order/'. $order->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 116 | + ->addColumn('action', function($order) { |
|
| 117 | + $deleteLink = \Form::deleteajax('/admin/order/'.$order->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 118 | 118 | $download = '<a href="/admin/order/'.$order->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a> '; |
| 119 | 119 | |
| 120 | 120 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | if ($data and $data['order']) { |
| 149 | 149 | |
| 150 | - if($data['type'] == 'one-pdf') { |
|
| 150 | + if ($data['type'] == 'one-pdf') { |
|
| 151 | 151 | $pdfHtml = ""; |
| 152 | 152 | $countOrders = count($data['order']); |
| 153 | 153 | $i = 0; |
@@ -173,15 +173,15 @@ discard block |
||
| 173 | 173 | $pdf = PDF::loadHTML($pdfHtmlBody); |
| 174 | 174 | |
| 175 | 175 | return $pdf->download('order-'.$order->generated_custom_order_id.'.pdf'); |
| 176 | - } elseif($data['type'] == 'product-list') { |
|
| 176 | + } elseif ($data['type'] == 'product-list') { |
|
| 177 | 177 | $products = OrderService::productsByOrderIds($data['order']); |
| 178 | 178 | |
| 179 | - if($products) { |
|
| 179 | + if ($products) { |
|
| 180 | 180 | |
| 181 | 181 | |
| 182 | - Excel::create('products', function ($excel) use ($products) { |
|
| 182 | + Excel::create('products', function($excel) use ($products) { |
|
| 183 | 183 | |
| 184 | - $excel->sheet('Products', function ($sheet) use ($products) { |
|
| 184 | + $excel->sheet('Products', function($sheet) use ($products) { |
|
| 185 | 185 | $newArray = array(); |
| 186 | 186 | foreach ($products as $key => $row) { |
| 187 | 187 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | if ($orders) { |
| 214 | 214 | Request::session()->put('print_orders', $orders->toArray()); |
| 215 | - return response()->json(array('orders' => $orders->toArray() )); |
|
| 215 | + return response()->json(array('orders' => $orders->toArray())); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | Request::session()->destroy('print_orders'); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | public function downloadLabel($orderId) |
| 256 | 256 | { |
| 257 | 257 | $order = OrderService::find($orderId); |
| 258 | - if($order->orderLabel()->count()) { |
|
| 258 | + if ($order->orderLabel()->count()) { |
|
| 259 | 259 | header("Content-type: application/octet-stream"); |
| 260 | 260 | header("Content-disposition: attachment;filename=label.pdf"); |
| 261 | 261 | echo $order->orderLabel->data; |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | |
| 288 | 288 | ); |
| 289 | 289 | foreach ($replace as $key => $val) { |
| 290 | - $content = str_replace("[" . $key . "]", $val, $content); |
|
| 290 | + $content = str_replace("[".$key."]", $val, $content); |
|
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | return $content; |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | |
| 301 | 301 | public function update($orderId) |
| 302 | 302 | { |
| 303 | - $result = OrderService::updateById(Request::all(), $orderId); |
|
| 303 | + $result = OrderService::updateById(Request::all(), $orderId); |
|
| 304 | 304 | |
| 305 | 305 | if ($result->errors()->all()) { |
| 306 | 306 | return redirect()->back()->withInput()->withErrors($result->errors()->all()); |
@@ -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.'); |