What problem does it solve?
This skill simplifies URL-to-handler mapping in ColdBox applications, reducing routing errors, duplicated boilerplate, and mismatched route/link definitions by providing clear patterns for resources, groups, constraints, and named routes.
Core Features & Use Cases
- RESTful resource generation: Use resources() to generate standard CRUD routes for common models.
- Route groups & API versioning: Group routes with shared prefixes, namespaces, and middleware to organize web and API endpoints.
- Constraints & HTTP verb enforcement: Apply regex constraints for numeric IDs, UUIDs, and slugs and restrict routes to specific HTTP methods.
- Named routes & link building: Define named routes to reliably generate URLs in handlers and templates.
- Use Case: Mount a module-based API with versioned groups and resources to separate web and API routing while enforcing parameter constraints.
Quick Start
Open your config/Router.cfc, enable full rewrites, add a named route and a resources("users") call to generate standard CRUD routes.