public function get($instance = 'default')
    {
        if (config('laracart.cross_devices', false) && $this->authManager->check()) {
            if (!empty($cartSessionID = $this->authManager->user()->cart_session_id)) {
                $this->session->setId($cartSessionID);
                $this->session->start();
            }
        }

        if (empty($this->cart = $this->session->get($this->prefix.'.'.$instance))) {
            $this->cart = new Cart($instance);
        }

        return $this;
    }
public function get($instance = 'default')
    {
        if (config('laracart.cross_devices', false) && $this->authManager->check()) {
            if (!empty($cartSessionID = $this->authManager->user()->cart_session_id)) {
                $this->session->setId($cartSessionID);
                $this->session->start();
            }
        }

        if (empty($this->cart = $this->session->get($this->prefix.'.'.$instance))) {
            $this->cart = new Cart($instance);
        }

        return $this;
    }
public function get ( $ instance = 'default' ) { if ( config ( 'laracart.cross_devices' , false ) && $ this -> authManager -> check ( ) ) { if ( ! empty ( $ cartSessionID = $ this -> authManager -> user ( ) -> cart_session_id ) ) { $ this -> session -> setId ( $ cartSessionID ) ; $ this -> session -> start ( ) ; } } if ( empty ( $ this -> cart = $ this -> session -> get ( $ this -> prefix . '.' . $ instance ) ) ) { $ this -> cart = new Cart ( $ instance ) ; } return $ this ; }
Gets the instance in the session.

@param string $instance

@return $this cart instance
Gets the instance in the session .