Model::select('column')
->where('column','value')
->inRandomOrder()
->limit(2) // here is yours limit
->get();
Laravel >= 5.2:
User::inRandomOrder()->get();
or to get the specific number of records
// 5 indicates the number of records
User::inRandomOrder()->limit(5)->get();
// get one random record
User::inRandomOrder()->first();
ModelName::where('column',$condition)->random($number)->get();
Model::where('column',$condition)->random($number)->get();