public function clearData()
    {
        $cart = Cart::where($this->cartIdentifier())->first();

        if ($cart) {
            $cart->delete();
        }
    }
public function clearData()
    {
        $cart = Cart::where($this->cartIdentifier())->first();

        if ($cart) {
            $cart->delete();
        }
    }
public function clearData ( ) { $ cart = Cart :: where ( $ this -> cartIdentifier ( ) ) -> first ( ) ; if ( $ cart ) { $ cart -> delete ( ) ; } }
Clears the cart details including cart items from the database.

@return void
Clears the cart details including cart items from the database .