Generate a controllers
In this section we will follow the generation of a new controller.
Usage¶
codoo controllers [OPTIONS]
Available options¶
Option | Type | Default | Description |
---|---|---|---|
-n, --name | TEXT | The name of the controller, (e.g: Awesome controller) | |
-a, --addons | TEXT | The name of the addon, (e.g: codoo_demo) |
Note
All the options are mandatory.
Extra options¶
Option | Type | Default | Description |
---|---|---|---|
Do you want to add routes? | BOOLEAN | False | Choose to add a route or not |
Route name ? | TEXT | Type a route name | |
Route auth ? | [public,user] | public | Choose the auth of the route |
Route type ? | [http,json] | http | Choose the type of the route |
Examples¶
codoo controllers \
-n "Awesome Controller" \
-a codoo_demo \
Now we know how to generate a new controller, so we will move to the next section which explain the generation of a new javascript component.