mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-21 19:16:23 +00:00
623 B
623 B
date | id | title |
---|---|---|
2020-11-16 | 19c60d30-34c0-49e2-bac9-764c0252ed96 | Route Annotations Priority |
Description
Defines rouuting priority, defaults to 0
Syntax
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class MyController extends AbstractController
{
/**
* @Route("/{some_parameter}", name="route1")
*/
public function someMethod(): Response
{
// ...
}
/**
* @Route("/foo", priority=10, name="route2")
*/
public function anotherMethod(): Response
{
// ...
}
}