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
Simplify Purchasing For Your Business Icon
Simplify Purchasing For Your Business

Manage what you buy and how you buy it with Order.co, so you have control over your time and money spent.

Simplify every aspect of buying for your business in Order.co. From sourcing products to scaling purchasing across locations to automating your AP and approvals workstreams, Order.co is the platform of choice for growing businesses.
Learn More
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