使用 Gii 生成代码（Generating Code using Gii）
Gii Extension for Yii 2
This extension provides a Web-based code generator, called Gii, for Yii 2 applications. You can use Gii to quickly generate models, forms, modules, CRUD, etc.
Gii provides a Web-based interface for you to interactively generate the code you want. It also provides a command line interface for people who prefer to work with their console windows most of the time.