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
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI. Switch between models without switching platforms.
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