inrandomorder laravel 7 code example
Example 1: laravel get random row
User::all()->random();
User::all()->random(10); // The amount of items you wish to receive
Example 2: inrandomorder laravel
$randomUser = DB::table('users')
->inRandomOrder()
->first();