従来のやり方
/**
*@Route('/hello', name='hello')
*/
public function helloControler() {
return $this->render('/hello/hello.html.twig',[
message => 'Hello!'
]);
}
Symfony6でのやり方
-/**
-*@Route('/hello', name='hello')
-*/
+#[Route('/hello', name:'hello')]
public function helloControler() {
return $this->render('/hello/hello.html.twig',[
message => 'Hello!'
]);
}