Hi I need to make an eloquent request with top 400 rows, and select 25 random.
Right now the query looks like this. I get the latest 400 rows
$result = Model::where('status', '=', 0)
->orderBy('id', 'desc')
->limit(400)
->get();
I know that I can do something like this, but then it will take all rows with status 0 but I want 25 out of the top 400.
$result = Model::where('status', '=', 0)
-inRandomOrder()
->limit(25)
->get();