laravel order by random
snippet in php

in random order laravel

user8693

Model::select('column')->where('column','value')->inRandomOrder()
    ->limit(2) // here is yours limit
    ->get();

------------------ OR --------------------

Model::inRandomOrder()->select('column')->where('column','value')->first();

laravel order by random

user9045

$galleries = App\Gallery::inRandomOrder()->get();
//Or
DB::table('gallery')->inRandomOrder()->get();