Laravel 8 isNotEmpty {#collection-method}
2021-07-19 10:32 更新
isNotEmpty
方法用于判断指定字符串是否不为空:
use Illuminate\Support\Str;
$result = Str::of(' ')->trim()->isNotEmpty();
// false
$result = Str::of('Laravel')->trim()->isNotEmpty();
// true
以上内容是否对您有帮助:
更多建议: