阅读(1490)
赞(17)
Laravel 8 replace {#collection-method}
2021-07-05 09:43:51 更新
replace 方法用于将字符串中的指定字符串替换为另一指定字符串:
use Illuminate\Support\Str;
$replaced = Str::of('Laravel 6.x')->replace('6.x', '7.x');
// Laravel 7.x replace 方法用于将字符串中的指定字符串替换为另一指定字符串:
use Illuminate\Support\Str;
$replaced = Str::of('Laravel 6.x')->replace('6.x', '7.x');
// Laravel 7.x