Code Generator
The generator creates project files from a short command. It writes controllers, views, models, entities, forms, routes, and other classes that follow the framework conventions.
Generating Files
Run make (or its alias g) and choose a subcommand:
php windwalker g controller Article
php windwalker generate:make entity Article
php windwalker g route ArticleUse --help to see the arguments of a subcommand:
php windwalker g controller --helpAvailable Subcommands
The subcommands come from the generator.commands configuration, which the host app loads from etc/app/console.config.php.
controllerviewmodelentitydataformrouteenumcomponentfieldpolicymiddlewarejobsubscribercommand
Revising Generated Files
generate:revise updates files that the generator created earlier, so you can regenerate them after changing the template or the input definition.
php windwalker generate:reviseTIP
Generate a file first, then edit it. Running the generator again on a file you changed may overwrite your edits, so keep changes under version control before you regenerate.
Building from the Database
Two commands build classes from existing database tables:
php windwalker build:entity
php windwalker build:enumUse build:entity to create an entity for each table, and build:enum to create enum classes. Review the output before you commit it.