Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blogpost: multiple chained middlewares to avoid duplicating responsibilities #105

Open
Ocramius opened this issue Jan 21, 2017 · 1 comment

Comments

@Ocramius
Copy link
Owner

See following example of a CQRS-style routing. The read side is re-used as a fallback of the write side. Still under discussion: shared mutable state in the form component.

988c25

@Ocramius
Copy link
Owner Author

As discussed with @weierophinney, it's better to return $next($req, $res)->withStatusCode(400); rather than passing down a modified request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant