我在模型里面定义了一个方法,
use think\Model;
class User extends Model
{
static function getTotal($userId){
$where['user_id']=$userId;
return self::where($where)->count('user_id');
}
}这里提示说
Non-static method 'where' should not be called statically看了手册,说这个是5.6.x废弃的特性,除了修改报错等级之外,还有啥修改办法? 看了下代码。where方法是非static.