annotation Athena::Routing::Callback
Overview
Defines a callback that should be executed at a specific point in the request's life-cycle.
Fields
- event :
CallbackEvents
- The event that the callback should be executed at. - only :
Array(String)
- Run the callback only for the provided actions. - exclude :
Array(String)
- Run the callback for all actions except those provided.
Example
@[Athena::Routing::Callback(event: Athena::Routing::CallbackEvents::OnResponse, only: ["users"])]