Hi,
I have a query with relations: \App\Products::where('xfs', '>',10)->with('users')->get()
I know the select method to get only specific columns. But this only returns columns from the Products model. How can I get specific columns from the User model?
Thanks!
@VILFAGO - Hehe. Thanks, I tried it and accidentally I tried it with the ids before i read your update.
Another question concerning this:
Is it possible to "flatten" this collection into one dimension? I know there's a flattenmethod for collections, but that doesn't work as expected. :(
I need the data to export it to a csv and I don't know how to handle this multidimension collection.