protected function storeCartDetails($cartData)
    {
        $cartData = $this->arraySnakeCase($cartData);

        $cart = Cart::updateOrCreate(
            $this->cartIdentifier(),
            array_merge($cartData, $this->getCookieElement())
        );

        return $cart->id;
    }
protected function storeCartDetails($cartData)
    {
        $cartData = $this->arraySnakeCase($cartData);

        $cart = Cart::updateOrCreate(
            $this->cartIdentifier(),
            array_merge($cartData, $this->getCookieElement())
        );

        return $cart->id;
    }
protected function storeCartDetails ( $ cartData ) { $ cartData = $ this -> arraySnakeCase ( $ cartData ) ; $ cart = Cart :: updateOrCreate ( $ this -> cartIdentifier ( ) , array_merge ( $ cartData , $ this -> getCookieElement ( ) ) ) ; return $ cart -> id ; }
Stores the cart data in the database table and returns the id of the record.

@param array Cart data
@return int
Stores the cart data in the database table and returns the id of the record .