Yii2 has a feature of generating CRUD for table with gii.
It creates several files: controller, model, search model and views.
What if after generating CRUD I need to add more fields to the table? I see that I need to change:
- Model's
- phpdoc
rules()
attributeLabels()
- Search model's
rules()
search()
(tweak->andFilterWhere()
calls)
- Views:
index
(grid columns)_form
(model inputs)_search
(search inputs)view
(attribute rows)
A lot of work. Is there a way to do it easier/automatically? I understand that I can just regenerate CRUD with gii, but in this case all my other tweaks would be overwritten (lost).
Maybe there exist some other CRUD solution for Yii2, that does not hardcode all fields and allows table schema changes to appear automatically in the views/models? Would be glad to know about it.