I’m trying to apply coupon using darryldecode library
public function applyDiscount(Request $request)
{
$condition = new DarryldecodeCartCartCondition(array(
'name' => 'voucher',
'type' => 'discount',
'target' => 'subtotal',
'value' => '12.5%',
));
Cart::condition($condition);
}
but still total amount is same.
reference:
https://packagist.org/packages/darryldecode/cart
https://github.com/darryldecode/laravelshoppingcart/blob/master/tests/CartConditionsTest.php
any solution Thanks