Model/ResourceModel/Order/Collection.php
public function getCustomerLastQuoteId(\Magento\Customer\Model\Customer $customer, $storeIds)
    {
        $collection = $this->quoteCollection->create()
            ->addFieldToFilter('customer_id', $customer->getId())
            ->addFieldToFilter('store_id', ['in' => $storeIds])
            ->setPageSize(1)
            ->setOrder('entity_id');

        if ($collection->getSize()) {
            return $collection->getFirstItem();
        }

        return false;
    }
public function getCustomerLastQuoteId(\Magento\Customer\Model\Customer $customer, $storeIds)
    {
        $collection = $this->quoteCollection->create()
            ->addFieldToFilter('customer_id', $customer->getId())
            ->addFieldToFilter('store_id', ['in' => $storeIds])
            ->setPageSize(1)
            ->setOrder('entity_id');

        if ($collection->getSize()) {
            return $collection->getFirstItem();
        }

        return false;
    }
public function getCustomerLastQuoteId ( \ Magento \ Customer \ Model \ Customer $ customer , $ storeIds ) { $ collection = $ this -> quoteCollection -> create ( ) -> addFieldToFilter ( 'customer_id' , $ customer -> getId ( ) ) -> addFieldToFilter ( 'store_id' , [ 'in' => $ storeIds ] ) -> setPageSize ( 1 ) -> setOrder ( 'entity_id' ) ; if ( $ collection -> getSize ( ) ) { return $ collection -> getFirstItem ( ) ; } return false ; }
Get customer last quote id.

@param \Magento\Customer\Model\Customer $customer
@param array $storeIds

@return boolean|\Magento\Quote\Model\Quote
Get customer last quote id .