Resourceful Routes
// Creates all resources that point to a photos event handler by convention
resources( "photos" );
// Register multiple resources either as strings or arrays
resources( "photos,users,contacts" )
resources( [ "photos" , "users", "contacts" ] );
// Register multiple fluently
resources( "photos" )
.resources( "users" )
.resources( "contacts" );
// Creates all resources to the event handler of choice instead of convention
resources( route="photos", handler="MyPhotoHandler" );
// All resources in a module
resources( route="photos", handler="photos", module="api" );
// Resources in a ModuleConfig.cfc
router.resources( "photos" )
.resources( resource="users", handler="user" )Scaffolding Resources
Last updated
Was this helpful?