Laravel 8 startsWith {#collection-method}
startsWith
用于判断字符串是否以指定值开头:
use Illuminate\Support\Str;
$result = Str::of('This is my name')->startsWith('This');
// true
startsWith
用于判断字符串是否以指定值开头:
use Illuminate\Support\Str;
$result = Str::of('This is my name')->startsWith('This');
// true