@@ -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'); |
@@ -38,14 +38,14 @@ discard block |
||
38 | 38 | |
39 | 39 | public function index($productId) |
40 | 40 | { |
41 | - $datatable = new ProductAmountOptionDatatable(); |
|
41 | + $datatable = new ProductAmountOptionDatatable(); |
|
42 | 42 | $product = $this->product->find($productId); |
43 | 43 | if (Request::wantsJson()) { |
44 | 44 | |
45 | 45 | $query = $this->productAmountOption->getModel()->where('product_id', '=', $productId); |
46 | 46 | |
47 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) use ($productId) { |
|
48 | - $deleteLink = Form::deleteajax('/admin/product/'.$productId.'/product-amount-option/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
47 | + $datatables = Datatables::of($query)->addColumn('action', function($query) use ($productId) { |
|
48 | + $deleteLink = Form::deleteajax('/admin/product/'.$productId.'/product-amount-option/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
49 | 49 | $links = '<a href="/admin/product/'.$productId.'/product-amount-option/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
50 | 50 | |
51 | 51 | return $links; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | public function store($productId) |
78 | 78 | { |
79 | 79 | |
80 | - $result = $this->productAmountOption->create(Request::all(), $productId); |
|
80 | + $result = $this->productAmountOption->create(Request::all(), $productId); |
|
81 | 81 | |
82 | 82 | if (isset($result->id)) { |
83 | 83 | Notification::success('The product amount option is updated.'); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | public function update($productId, $id) |
109 | 109 | { |
110 | 110 | |
111 | - $result = $this->productAmountOption->updateById(Request::all(), $productId, $id); |
|
111 | + $result = $this->productAmountOption->updateById(Request::all(), $productId, $id); |
|
112 | 112 | |
113 | 113 | if (!$result->id) { |
114 | 114 | return redirect()->back()->withInput()->withErrors($result->errors()->all()); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | public function destroy($productId, $id) |
122 | 122 | { |
123 | - $result = $this->productAmountOption->destroy($id); |
|
123 | + $result = $this->productAmountOption->destroy($id); |
|
124 | 124 | |
125 | 125 | if ($result) { |
126 | 126 | Notification::success('The product amount option is deleted.'); |