Why Does CakePHP Cake Bake Create Separate Add and Edit?

I am learning CakePHP and recently tried Cake Bake for the first time. It creates separate actions and views for different portions of CRUD. On this, I was suggested by my mentor that I should merge the add and edit functionality into a single action and view. And to identify the edit mode by passing the id as passed argument.

After doing so, when I was developing, I noticed that my efforts were effectively halved. Whenever a change had to be made in an input, or a new element had to be added, or some new text needed to be added, I only needed to do it once for the add and edit functionality.

What makes me wonder is that am I doing something non-CakePHP way, or is this really how things should be?

Comments