Laravel 8 start {#collection-method}
2021-07-19 10:35 更新
start
方法用于将某个值添加到字符串的头部,若该字符串没有以此值开头:
use Illuminate\Support\Str;
$adjusted = Str::of('this/string')->start('/');
// /this/string
$adjusted = Str::of('/this/string')->start('/');
// /this/string
以上内容是否对您有帮助:
更多建议: