php - How to get Laravel rows randomly, from filtered rows?
I've got a Laravel model, (Cars). I'd like to get 4 random cars, but only picking these 4 random cars from a subset of the top 10 cars, as ranked by their 'score_total'
I've tried the code below, but the inRandomOrder doesn't seem to have any effect. Any advice would be much appreciated. I'm on Laravel 5.4.