This repository was archived by the owner on Jun 9, 2026. It is now read-only.
2.8.1
What's Changed
- Moved API resource route shaping and registration out of
CoreRouterand intoResourceRoutes. - Added chainable
.only()and.except()methods directly onRouter.apiResource()results. - Added support for passing a single action, multiple actions, or an action array:
Router.apiResource('/books', BookController)
.only('index', 'show')
Router.apiResource('/books', BookController)
.except('destroy')
Router.apiResource('/books', BookController)
.only(['index', 'show'])
.middleware(AuthMiddleware)- Added route removal support so resource routes can be cleanly re-registered when filters are chained.
- Kept middleware chaining support intact across resource re-registration.
- Added docs for chainable resource filters in routing and middleware guides.
- Added tests for
.only()/.except()chaining and TypeScript coverage.
Internal
- Added a shared
wrap()helper. - Simplified
CoreRouter.apiResource()so it now constructs and delegates toResourceRoutes.
Full Changelog: 2.8.0...2.8.1