📜  如何检查 eloquent 结果是否为空 - CSS 代码示例

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

代码示例1
Note:- Credit for this result goes to Alberto Peripolli. Copied from his Grepper.
if ($result->first()) { } 
if (!$result->isEmpty()) { }
if ($result->count()) { }
if (count($result)) { }