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
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
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