LukePOLO\LaraCart\CartItem::tax PHP Method

tax() public method

Gets the tax for the item.
public tax ( integer $amountNotTaxable ) : integer | mixed
$amountNotTaxable integer
return integer | mixed
    public function tax($amountNotTaxable = 0)
    {
        if (!$this->taxable) {
            $amountNotTaxable = $amountNotTaxable + $this->price * $this->qty;
        }
        return $this->tax * ($this->subTotal(false, config('laracart.discountTaxable', true), true) - $amountNotTaxable);
    }