阅读(4263)
赞(0)
Laravel 8 Str::random() {#collection-method}
2021-07-03 16:54:20 更新
Str::random
函数生成一个指定长度的随机字符串。这个函数用 PHP 的 random_bytes 函数
use Illuminate\Support\Str;
$random = Str::random(40);
Str::random
函数生成一个指定长度的随机字符串。这个函数用 PHP 的 random_bytes 函数
use Illuminate\Support\Str;
$random = Str::random(40);