I'm trying to access variables in my controller that I set in my function calling in twig. It actually looks like this:
{{ render(controller('AppBundle:Domain:show', {
'test': 'ok'
})) }}
And in my controller it looks like this:
public function showAction(Request $request, $test = null)
{
$test = $test ? $test : 'notOk';
var_dump($test); // result "notOK"
die;
}
My aim is to have var_dump($test); resulting in 'ok'