2.6.3
What's Changed
New Features
-
Named API resource routes — routes registered via
apiResource()are now automatically assigned a name derived from the route path (e.g.account.books.d.show), making them referenceable by name across the application. -
Inferred param names —
apiResource()can now infer the route parameter name from the base path (e.g./books→:book) instead of defaulting to:id. Requires@h3ravel/supportto be installed.
Configuration
Set inferParamName: true in your router config to opt in:
Router.configure({ inferParamName: true })
Router.apiResource('/account/users', UserController)Defaults to false — fully backwards compatible, existing routes are unaffected.
Full Changelog: 2.6.1...2.6.3