This PR simplifies the registration of API routes, by combining related registration declarations into a single apiResource declaration.
Most resources can be bundled together via Route::apiResources([...]). However, the scoped resources incidents.updates and metrics.points have to be registered as separate Route::apiResource(...) to accommodate correctly scoping resources to their parents as well as defining the route param names used by Laravel's implicit route binding (thus removing the requirement to alter the variable names type hinted in the controllers... e.g. renaming $incidentUpdate to just $update)
This PR simplifies the registration of API routes, by combining related registration declarations into a single
apiResource
declaration.Most resources can be bundled together via
Route::apiResources([...])
. However, the scoped resourcesincidents.updates
andmetrics.points
have to be registered as separateRoute::apiResource(...)
to accommodate correctly scoping resources to their parents as well as defining the route param names used by Laravel's implicit route binding (thus removing the requirement to alter the variable names type hinted in the controllers... e.g. renaming$incidentUpdate
to just$update
)