79234134

Date: 2024-11-28 13:46:44
Score: 0.5
Natty:
Report link

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

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Whitelisted phrase (-1.5): you can use
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Pedro Rodrigues