Routing
Define application routes in routes/web.php.
Basic routes
Register routes by HTTP method and provide a callback or controller handler.
Use router()->add() when registering several methods explicitly:
Parameters
Declare path parameters in braces and receive their values in the route handler.
Route parameters are injected into closures and controller methods by name.
Named routes
Name routes that must be referenced when generating URLs or redirects.
Groups
Groups apply a URI prefix and may inherit middleware from parent groups:
Listing routes
Inspect registered routes to verify their methods, paths, names, and middleware.
Route cache
Use controller handlers for routes that should be cached. Closure routes cannot be cached.
Attribute routes can be discovered from app/Controllers when enabled in
config/app.php.