Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

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?'

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Grummfy grummfy Joined 27 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.