Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EloquentController does not need to extend JsonApiController #15

Closed
lindyhopchris opened this issue Aug 26, 2016 · 1 comment
Closed
Milestone

Comments

@lindyhopchris
Copy link
Member

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.

@lindyhopchris lindyhopchris added this to the 0.5.0 milestone Aug 26, 2016
@lindyhopchris
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant