As on laravel documentation, you can use random in arrays, something like this: laravel documentation
use Illuminate\Support\Arr;
$array = [1, 2, 3, 4, 5];
$random = Arr::random($array);
Or you can do it directly on colletions, like said by aebersold in this stackoverflow post