Laravel 8 is {#collection-method}
is 方法用于判断字符串是否与指定模式匹配。星号 * 用于表示通配符:
use Illuminate\Support\Str;
$matches = Str::of('foobar')->is('foo*');
// true
$matches = Str::of('foobar')->is('baz*');
// false
is 方法用于判断字符串是否与指定模式匹配。星号 * 用于表示通配符:
use Illuminate\Support\Str;
$matches = Str::of('foobar')->is('foo*');
// true
$matches = Str::of('foobar')->is('baz*');
// false