阅读(4396)
赞(6)
Laravel 8 is {#collection-method}
2021-07-05 09:43:48 更新
is
方法用于判断字符串是否与指定模式匹配。星号 *
用于表示通配符:
use IlluminateSupportStr;
$matches = Str::of('foobar')->is('foo*');
// true
$matches = Str::of('foobar')->is('baz*');
// false