Virtual fields with Cakephp 3

独自空忆成欢 提交于 2019-12-03 14:21:06

According to @ndm, the problem was due to a bad file naming. I named the user entity class UserEntity.php. The CakePHP name conventions says that:

The Entity class OptionValue would be found in a file named OptionValue.php.

Thanks.

Why not just go for something like this?

/*
 * Return Fullname
 */
public function getFullname()
{
    $name = $this->firstname . ' ' . $this->lastname;
    return $name;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!