public function items($displayCurrency = false)
    {
        $items = $this->items->map->toArray();

        if (! $displayCurrency) {
            return $items->toArray();
        }

        setlocale(LC_MONETARY, config('cart_manager.LC_MONETARY'));

        return $items->map(function ($item) {
            $item['price'] = money_format('%n', $item['price']);

            return $item;
        })->toArray();
    }
public function items($displayCurrency = false)
    {
        $items = $this->items->map->toArray();

        if (! $displayCurrency) {
            return $items->toArray();
        }

        setlocale(LC_MONETARY, config('cart_manager.LC_MONETARY'));

        return $items->map(function ($item) {
            $item['price'] = money_format('%n', $item['price']);

            return $item;
        })->toArray();
    }
public function items ( $ displayCurrency = false ) { $ items = $ this -> items -> map -> toArray ( ) ; if ( ! $ displayCurrency ) { return $ items -> toArray ( ) ; } setlocale ( LC_MONETARY , config ( 'cart_manager.LC_MONETARY' ) ) ; return $ items -> map ( function ( $ item ) { $ item [ 'price' ] = money_format ( '%n' , $ item [ 'price' ] ) ; return $ item ; } ) -> toArray ( ) ; }
Returns the cart items.

@return array
Returns the cart items .