1

I found a code at /vendor/magento/module-customer/Controller/Account/Login.php

/** @var Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create();

I want to know everything related to this object. which model or class it linked to and how does it work. The flow of the code and more information i need to have in this.

1

This "resultRedirectFactory" used to create redirect from your controller to another url

If you want to redirect it to another controller then simply create resultRedirectFactory and set path

$resultRedirect = $this->resultRedirectFactory->create();
$resultRedirect->setPath('sales/order/view') // syntax is frontname/controllerdirectory/controllerclass
return $resultRedirect;

At last just return and get redirect to the path you set

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.