You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is little benefit to EloquentController extending JsonApiController, particular as the EloquentController is not using any of the method signatures such as $resourceId. It would make more sense to combine standard controller helpers into a trait and use this in both EloquentController and JsonApiController.
This would also make it easier for people to write their own controllers as they could then just apply the trait if for some reason the method signatures of JsonApiController cannot be used. An example of this is when using wildcard sub-domains, each method on that controller would actually get called with the sub-domain variable first so JsonApiController would not be easy to use.
The text was updated successfully, but these errors were encountered:
This change is no longer required because the changes for Laravel 5.3 mean the Eloquent controller needs to use the constructor in the JSON API controller, plus now needs to use the same method signatures for each of the action methods.
There is little benefit to
EloquentController
extendingJsonApiController
, particular as theEloquentController
is not using any of the method signatures such as$resourceId
. It would make more sense to combine standard controller helpers into a trait and use this in bothEloquentController
andJsonApiController
.This would also make it easier for people to write their own controllers as they could then just apply the trait if for some reason the method signatures of
JsonApiController
cannot be used. An example of this is when using wildcard sub-domains, each method on that controller would actually get called with the sub-domain variable first soJsonApiController
would not be easy to use.The text was updated successfully, but these errors were encountered: