symfony call another controller

Solutions on MaxInterview for symfony call another controller by the best coders in the world

showing results for - "symfony call another controller"
Leo
19 Aug 2017
1// OtherController::fancy($name, $color) will be executed
2public function myAction($name)
3{
4    $response = $this->forward(
5    	'App\Controller\OtherController::fancy',
6    	array(
7      		'name'  => $name,
8        	'color' => 'green',
9    	)
10    );
11    // ... further modify the response or return it directly
12    return $response;
13}