Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 1 year ago.
0

There's absolutely no difference in the query between the two: get($cols) and select($cols)->get(). The only difference is with the methods behaviour: get accepts only array, while select either array or multiple string params (that are grabbed to an array anyway).

0

If that is true, I don't know why it works in only one of those cases. It maybe has to do with other code that uses that variable. Anyway, thank you for clarifying the issue.

0

If that is true, I don't know why it works in only one of those cases. It maybe has to do with other code that uses that variable. Anyway, thank you for clarifying the issue.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

shirkkan shirkkan Joined 19 Dec 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.