When your application receives a request, it calls a controller action to generate the response. The routing configuration defines which action to run for each incoming URL. It also provides other useful features, like generating SEO-friendly URLs (e.g. /read/intro-to-symfony instead of index.php?article_id=57). Routes can be configured in YAML, XML, PHP or using either attributes or annotations. All formats provide the same features and performance, so choose your favorite. Symfony recommends attributes because it’s convenient to put the route and controller in the same place. On PHP 8, you can use native attributes to configure routes right away. On PHP 7, where attributes are not available, you can use annotations instead, provided by the Doctrine Annotations library. This configuration tells Symfony to look for routes defined as annotations in any PHP class stored in the src/Controller/ directory.

Features

  • Create routes as attributes or annotations
  • Creating routes in YAML, XML or PHP Files
  • Match HTTP methods
  • Route groups and prefixes
  • Render a template directly from a route
  • Redirect to URLs and routes directly from a route
  • This component is backed by redirection.io

Project Samples

Project Activity

See All Activity >

Categories

Router

License

MIT License

Follow Routing Component

Routing Component Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Routing Component!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Router Firmware

Registered

2021-08-11