Basic usage
Generate URLs using the router’smakeUrl() method:
Named routes
Name your routes using the.as() method:
Route parameters
Pass parameters to generate URLs with dynamic segments:Query strings
Add query string parameters:Absolute URLs
Generate absolute URLs with protocol and domain:Signed URLs
Generate signed URLs for temporary access:Verifying signed URLs
Verify signed URLs in your route handlers:Using in templates
Theroute() helper is available in Edge templates:
Route groups and prefixes
Route names inherit group prefixes:Domain-based routes
Generate URLs for domain-specific routes:Form actions
Generate form action URLs:Checking route existence
Check if a route exists:URL builder in Edge
Edge provides theformAttributes() helper for forms:
TypeScript support
The URL builder is fully typed:Best practices
Always name important routes
Always name important routes
Name routes that you’ll reference in templates or redirect to:
Use consistent naming conventions
Use consistent naming conventions
Follow RESTful naming conventions:
resource.index- List allresource.show- Show oneresource.create- Show create formresource.store- Create newresource.edit- Show edit formresource.update- Update existingresource.destroy- Delete
Group related routes
Group related routes
Validate signed URLs
Validate signed URLs
Always verify signatures for protected routes:
Related documentation
Routing
Learn more about defining routes
Response
Learn about redirecting to routes