Symfony Call Another Controller

[Solved] Symfony Call Another Controller | Php Frameworks Symfony - Code Explorer | yomemimo.com
Question : symfony call another controller

Answered by : niki-romagnoli

// OtherController::fancy($name, $color) will be executed
public function myAction($name)
{ $response = $this->forward(	'App\Controller\OtherController::fancy',	array(	'name' => $name,	'color' => 'green',	) ); // ... further modify the response or return it directly return $response;
}

Source : https://symfony.com/doc/current/controller/forwarding.html | Last Update : Wed, 31 Mar 21

Answers related to symfony call another controller

Code Explorer Popular Question For Php Frameworks Symfony