I need to implement a link which redirects to the url of the last order of the current user
How do I do that ?
I have a code that load the last order, but I need to get the URL
$orders = $this->_orderCollectionFactory->create();
$orders->addFieldToFilter('customer_id', $customerId);
$orders->addOrder('customer_id');
$orderId = $orders->getLastItem()->getData('entity_id');
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('\Magento\Sales\Model\Order')->load($orderId);