Laravel Collection Public API: random
The random method in Laravel's Collection class allows you to retrieve a random number of items from a collection. By default, it returns one random item, but you can specify a different number of items to be returned. If you request more items than are available in the collection, an exception will be thrown. You can use the random method...