public function restore($id)
    {
        $cart = $this->repo->findByIdAndInstanceName($id, $this->instanceName);

        if ($cart === null) {
            return;
        }

        $unserialized = unserialize(json_decode($cart->content));
        $this->content = $unserialized['content'];
        $this->coupons = $unserialized['coupons'];

        $this->instance($cart->instance);

        return $this;
    }
public function restore($id)
    {
        $cart = $this->repo->findByIdAndInstanceName($id, $this->instanceName);

        if ($cart === null) {
            return;
        }

        $unserialized = unserialize(json_decode($cart->content));
        $this->content = $unserialized['content'];
        $this->coupons = $unserialized['coupons'];

        $this->instance($cart->instance);

        return $this;
    }
public function restore ( $ id ) { $ cart = $ this -> repo -> findByIdAndInstanceName ( $ id , $ this -> instanceName ) ; if ( $ cart === null ) { return ; } $ unserialized = unserialize ( json_decode ( $ cart -> content ) ) ; $ this -> content = $ unserialized [ 'content' ] ; $ this -> coupons = $ unserialized [ 'coupons' ] ; $ this -> instance ( $ cart -> instance ) ; return $ this ; }
Store the specified instance of the cart.

@param $id

@return $this
Store the specified instance of the cart .