Open montyclt opened 6 years ago
No.
How would my UserListEntryResource even now to look for the User model? How would the model binding system connect the two?
If you (always) wanted to return an API resource, you might consider just using explicit route mode binding instead.
Hello all!
I thought it might be a good idea to implicit inject an API Resource in Controller like model does.
When any User with the given ID exists, retrieve the model, and instance the type-hinted API resource. If any user with the ID exists, throws
ModelNotFoundException
.What is your opinion?