Laravel Tip: Random Model Scope
Published on by Eric L. Barnes
I was needing to get a randomized set of Users for a project I was working on and came up with this dead-simple way of doing that using a random() scope.
David Hemphill shares a cool tip for using Query Scopes.
Eric is the creator of Laravel News and has been covering Laravel since 2012.