📜  laravel Str::random - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:53.136000             🧑  作者: Mango

代码示例2
//select random value from array
use Illuminate\Support\Arr;

$array = [1, 2, 3, 4, 5];

$random = Arr::random($array);


//generate random string of specific length
use Illuminate\Support\Str;

$random = Str::random(40);