Enabling CRUD operations for users
The previously mentioned tests introduced us to using AR class instances. It showed us how to use them to create new records, retrieve back existing records, update existing records, and delete existing records. We spent a lot of time testing these lower-level operations on the AR class instance for the Project table, but our TrackStar application does not yet expose this functionality to users. What we really need is a way for users to Create, Read, Update, and Delete projects within the application. Now that we know our way around AR a little, we could start coding this functionality in some controller class. Luckily, we don't have to.
Creating CRUD scaffolding for projects
Once again, the Gii code generation tool is going to rescue us from having to write common, tedious and often time-consuming code. CRUD operations are such a common need of database tables created for applications that the developers of Yii decided to provide this for us. If you are...