v0.13.0 — controllers
Fuller controller support, AdonisJS-style:
- Single-action controllers —
router.post("/publish", [PublishPost])callshandle(). - Lazy-loaded controllers —
[() => import("../Controllers/X.js"), "index"], imported only when the route is hit. - Richer resources —
.as(name),.params({ posts: "post" }),.use(actions, mw), and nested resources (router.resource("posts.comments", C)→/posts/:post_id/comments/:id). make:controller --resourcegenerates all 7 RESTful actions.
See docs/controllers.md.