Laravel 8 Str::replaceArray() {#collection-method}
Str::replaceArray
函数使用数组顺序替换字符串中的给定值:
use Illuminate\Support\Str;
$string = 'The event will take place between ? and ?';
$replaced = Str::replaceArray('?', ['8:30', '9:00'], $string);
// 活动将在 8:30 至 9:00 之间进行