The cake console is run using the PHP CLI (command line interface). If you have problems running the script, ensure that:
- You have the PHP CLI installed and that it has the proper modules enabled (eg: MySQL, intl).
- Users also might have issues if the database host is ‘localhost’ and should try ‘127.0.0.1’ instead, as localhost can cause issues with PHP CLI.
- Depending on how your computer is configured, you may have to set execute rights on the cake bash script to call it using
bin/cake bake.
Before running bake you should make sure you have at least one database connection configured. See the section on database configuration for more information.
When run with no arguments
bin/cake bake will output a list of available tasks. You should see something like:$ bin/cake bake
Welcome to CakePHP v3.4.6 Console
---------------------------------------------------------------
App : src
Path: /var/www/cakephp.dev/src/
PHP : 5.6.20
---------------------------------------------------------------
The following commands can be used to generate skeleton code for your application.
Available bake commands:
- all
- behavior
- cell
- component
- controller
- fixture
- form
- helper
- mailer
- migration
- migration_diff
- migration_snapshot
- model
- plugin
- seed
- shell
- shell_helper
- task
- template
- test
By using `cake bake [name]` you can invoke a specific bake task.
You can get more information on what each task does, and what options are available using the
--help option:
No comments:
Post a Comment