在普通的通过ORM获取某行的date字段值时提示
return $this->find(1)->date;
Maximum function nesting level of '256' reached, aborting!
根据debug追溯可知
if (in_array($key, $this->getDates()) &&
! is_null($value)) {
return $this->asDateTime($value);
}
中调用了$this->getDates()函数,与我这段代码外的函数同名
public function getDates()
推测重载了Model的getDates()函数,更改函数名即可。
或者使用DB::('dbname')来操作数据库也可解决。