Skip to content

Method for bailing out of a router and returning to the previous middleware level #2241

@Twipped

Description

@Twipped

Per conversation with @dougwilson on IRC, it would be very useful to have an equivalent for next('route'), but at the router level. Calling it would cause a router to skip all remaining middleware and routes on that router.

This would allow for conditional execution of middleware, such as session handling and session related middleware only being evoked for users with an existing session cookie.

next('router') could work, but that might be too close of terms.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions