在Laravel中判断表是否为空
在Laravel中判断表是否为空
我正在尝试找出我的表是否为空,但是我遇到了这个错误
调用未定义函数App\\Http\\Controllers\\isEmpty()
我检查了和我的标题相似的问题,但没有我需要的东西。
这是我的代码
$orders = Order::all(); if(isEmpty($orders)) { echo "Im empty"; die(); }else{ echo "im not empty"; die(); }
admin 更改状态以发布 2023年5月20日