cakephp new field not saving

前端 未结 10 779
渐次进展
渐次进展 2021-02-02 14:43

How to you extend a cakePHP project so it can use a new field in the database?

I just given a CakePHP Project that I am trying to extend the model to include a new field

10条回答
  •  旧巷少年郎
    2021-02-02 15:18

    You need to inform cakephp that you have new fields in your db. Why you need to do so is coz cakephp scans the db only once and generates the schemas. Once refers to first time it's run. You can find the schemas in app\tmp\cache\models.

    So if you clear the files in the above folder cake will re generate the schema. Now there is a exception to it, if you are in development/debug mode cakephp scans it everytime.

提交回复
热议问题