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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
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