CakePHP 总结

1. 处理任何保存或获取数据的操作最好都写在模型(Model)中。这个概念通常被称为fat model。

2. 返回上一条插入记录的ID, $this->Example->getInsertID() 或 $this->Example->getLastInsertID() 。

app/Config/bootstrap.php

文件

原文地址:https://www.cnblogs.com/mafeifan/p/3484702.html