|
@@ 168-175 (lines=8) @@
|
| 165 |
|
return 'success'; |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function ReduseQty(Request $request) { |
| 169 |
|
$id = $request->input('id'); |
| 170 |
|
Cart::update($id, [ |
| 171 |
|
'quantity' => -1, // so if the current product has a quantity of 4, it will subtract 1 and will result to 3 |
| 172 |
|
]); |
| 173 |
|
//dd(Cart::getContent()); |
| 174 |
|
return 'success'; |
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
public function IncreaseQty(Request $request) { |
| 178 |
|
$id = $request->input('id'); |
|
@@ 177-184 (lines=8) @@
|
| 174 |
|
return 'success'; |
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
public function IncreaseQty(Request $request) { |
| 178 |
|
$id = $request->input('id'); |
| 179 |
|
Cart::update($id, [ |
| 180 |
|
'quantity' => +1, // so if the current product has a quantity of 4, it will add 1 and will result to 5 |
| 181 |
|
]); |
| 182 |
|
//dd(Cart::getContent()); |
| 183 |
|
return 'success'; |
| 184 |
|
} |
| 185 |
|
|
| 186 |
|
public function AddAddons($id) { |
| 187 |
|
$addon = $this->addons->where('id', $id)->first(); |