PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 15, 2022

[FIXED] CakePHP re-baking concerns

 January 15, 2022     cakephp, cakephp-2.0     No comments   

Issue

I'm new to CakePHP. I added some columns to my table abc. Is it possible not to re-bake my model Abc and its corresponding contoller and views? I already made a lot of changes and I think baking it again will overwrite my existing files. Thanks.


Solution

Baking is only needed when you want to generate automatic code. If you have already modified your Models/Controllers/Views and have added new columns in your database, then you will have to edit manually your Models/Controllers/Views to make relevant modifications.

You will probably want to edit Models to add validation rules for the new columns, to edit Views to add new inputs for these columuns. Controllers will probably remain unchanged.



Answered By - Chris
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing