Laravel - Query Builder - Random Ordering

The inRandomOrder method may be used to sort the query results randomly. For example, you may use this method to fetch a random user:

    
    $randomUser = DB::table('users')
                    ->inRandomOrder()
                    ->first();