vendredi 29 juillet 2016

Laravel Groupby return count instead of each row value

I am working with laravel 5.2 and can't get this query to work. I have a fruit table, with a column fruit name. I want to group by fruit name .But I have the model named Fruit also, I am getting the count of each repeated fruit name but I want each row value , example apple is selected by 5 members means ,then I must need all member values correspond to apple , but I am currently getting only on value.Can you please write query for my case.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire