📜  laravel 检查集合不为空 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:31.983000             🧑  作者: Mango

代码示例1
if ($mentor->first()) { } 
if (!$mentor->isEmpty()) { }
if ($mentor->count()) { }
if (count($mentor)) { }
if ($mentor->isNotEmpty()) { }