Answer
Php 8 added a new feature called named arguments, it allows you to pass input data into a function, based on their argument name instead of the argument order.
It is possible to combine named and ordered arguments, but only if the ordered arguments came first.
To make you code work, you have two options
Use named arguments for all arguments:
return $this->render(view:'student/affiche.html.twig', parameters:['n' => $name]);
Do not use named arguments at all:
return $this->render('student/affiche.html.twig', ['n' => $name]);
Here is a link where you can learn more about named arguments
0 comments:
Post a Comment
Thanks