It returns a collection which give you a lot more power than a regular query result set. If you take a look at the docs and read about Collections, hopefully you will see the benefit of a collection. The are very powerful. It also depends on the query what you get back and you have control over what you get back. Laravel doesn't force you to work with anything.
http://laravel.com/docs/4.2/eloquent#collections
Once you start using them, you will start to think 'why hasn't it always been this way?'
Yes it's a collection, I see it. But if we want an object it could be a collection of real object, not a collection with an array or stdclass inside ...
Depending on what you do, adding the way to directly bind result to model class could realy be itnresting. Even if the msot of the time you pass by a collection.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community