- Create a theme
- Create a plugin
- Create a component
- Create a model
- Create a settings model
- Create a backend controller
- Create a form widget
- Create a report widget
- Create a console command
The following commands allow you to quickly scaffold additional code into your Winter project, speeding up development time.
php artisan create:theme <theme code>
The create:theme
command generates a theme folder and basic files for the theme. The first argument specifies the theme code, eg. myauthor-mytheme
.
php artisan create:plugin <plugin code>
The create:plugin
command generates a plugin folder and basic files for the plugin. The first argument specifies the author and plugin name, eg. MyAuthor.MyPlugin
.
php artisan create:component <plugin code> <component name>
The create:component
command creates a new component class and the default component view. The first argument specifies the plugin code of the plugin that this component will be added into, and the second parameter specifies the component class name, eg. MyComponent
.
php artisan create:model <plugin code> <model name>
The create:model
command generates the files needed for a new model. The first argument specifies the plugin code of the plugin that this model will be added into, and the second parameter specifies the model class name, eg. MyModel
.
php artisan create:settings <plugin code> [model name]
The create:settings
command generates the files needed for a new Settings model. The first argument specifies the plugin code of the plugin that this model will be added into, and the second parameter is optional and specifies the Settings model class name (defaults to Settings
).
php artisan create:controller <plugin code> <controller name>
The create:controller
command generates a controller, configuration and view files. The first argument specifies the plugin code of the plugin that this controller will be added into, and the second parameter specifies the controller class name, eg. MyController
.
php artisan create:formwidget <plugin code> <widget name>
The create:formwidget
command generates a backend form widget, view and basic asset files. The first argument specifies the plugin code of the plugin that this form widget will be added into, and the second parameter specifies the form widget class name, eg. MyFormWidget
.
php artisan create:reportwidget <plugin code> <widget name>
The create:reportwidget
command generates a backend report widget, view and basic asset files. The first argument specifies the plugin code of the plugin that this report widget will be added into, and the second parameter specifies the report widget class name, eg. MyReportWidget
.
php artisan create:command <plugin code> <command name>
The create:command
command generates a new console command. The first argument specifies the plugin code of the plugin that this console command will be added into, and the second parameter specifies the command name.