Creates a new RouteResource instance
The AdonisJS application instance
Array of global middleware registered on the router
Configuration options for the route resource
Register only given routes and remove others
Array of action names to keep
Current RouteResource instance with filtered actions
Register all routes, except the one's defined
Array of action names to exclude
Current RouteResource instance with filtered actions
Register api only routes. The create
and edit
routes, which
are meant to show forms will not be registered
Current RouteResource instance without create and edit actions
Define matcher for params inside the resource
The parameter name to match
The matcher pattern (RegExp, string, or RouteMatcher)
Current RouteResource instance for method chaining
Tap into multiple routes to configure them by their name
Function to configure routes
Current RouteResource instance for method chaining
Tap into multiple routes to configure them by their name
Action name(s) to configure
Function to configure matching routes
Current RouteResource instance for method chaining
Set the param name for a given resource
Object mapping resource names to parameter names
Current RouteResource instance for method chaining
Define one or more middleware on the routes created by the resource.
Calling this method multiple times will append middleware to existing list.
Action name(s) or '*' for all actions
Middleware function(s) to apply
Current RouteResource instance for method chaining
Alias for RouteResource.use
Action name(s) or '*' for all actions
Middleware function(s) to apply
Current RouteResource instance for method chaining
Prepend name to all the routes
The name to prepend to all route names
Whether to normalize the name to snake_case
Current RouteResource instance for method chaining
Route resource exposes the API to register multiple routes for a resource.