Closed Anahkiasen closed 11 years ago
+1.
What framework was this again this was from? It rings a bell. Was it Kohana or was it that redbean ORM?
If you have an idea for how to implement it, feel free to open a proposal with some code examples of how it could be done in Eloquent. Personally I'm not inclined to implement it at the moment.
One feature I always found missing in Laravel was some sort of support for subrelationships. Say I have a Blog model which has Article. Those articles themselves have Comment models. It would be nice to be able to do something like that :
Which would do something like that in the background :
Although the above solution works fine it doesn't work with any already eager-loaded
articles
relationship nor does it allow me to use Eloquent's relationship syntax (ie.$blog->articles
vs$blog->articles()
).