Support the ongoing development of Laravel.io →

returnvalue

Joined 19 Mar 2015

Statistics

Threads 3
Replies 2
Solutions 0
Articles 0

Count number of times link_id occurs on pivot table, and sort by highest number of occurences

User.php public function favorites() { return $this->belongsToMany('Link')->wi...

0 Likes
1 Replies

Most Used Tags

hi! I have a Post and Tag model with a many to many pivot table, how do you write a query to find th...

0 Likes
0 Replies
posted 9 years ago

eloquent using groupBy and orderBy

Hi guys, Do you know how I can rewrite this query so that orderBy actually works? http://laravel.io/...

0 Likes
3 Replies
replied 9 years ago

eloquent using groupBy and orderBy

Here is the SQL I'm trying to convert into eloquent or query builder http://laravel.io/bin/vBk6V Any...

0 Likes
replied 9 years ago

eloquent using groupBy and orderBy

Yes you're exactly right. The order of the results is coming back in the reverse of what I want. R...

0 Likes

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.