Symfony route annotation exclude route

I have the following annotation, so any route except the api,
I wanna also exclude all the routes that start with /admin too
I’m sorry I’m new to symfony and i also dont know much about regular expressions please someone help

/**
 * @Route("/", name="homepage")
 * @Route("/{route}", name="vue_pages", requirements={"route"="^(?!.*api).+"})
 */

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *