Laravel 8 Str::before() {#collection-method}
Str::before
方法返回字符串中指定值之前的所有内容:
use Illuminate\Support\Str;
$slice = Str::before('This is my name', 'my name');
// 'This is '
Str::before
方法返回字符串中指定值之前的所有内容:
use Illuminate\Support\Str;
$slice = Str::before('This is my name', 'my name');
// 'This is '