Needed this for a WordPress to Laravel conversion project I'm working on. For the footer I needed to pull the top authors, sorted by the number of posts associated with them. On the site, it's actually fonts, but posts makes more sense for most people.
Last active
July 31, 2019 19:55
-
-
Save RyanNutt/a2dc6282f8223e9e91f97a7a03c7697d to your computer and use it in GitHub Desktop.
Laravel Eloquent query to pull the authors with the most posts connected by a hasMany relationship
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment