45. CakePHP3 - セットアップ
# composer create-project --prefer-dist cakephp/app cake3
Installing cakephp/app (3.0.3)
- Installing cakephp/app (3.0.3)
Loading from cache
Created project in cake3
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing aura/installer-default (1.0.0)
Loading from cache
- Installing cakephp/plugin-installer (0.0.12)
Loading from cache
Writing lock file
Generating autoload files
Created `config/app.php` file
Set Folder Permissions ? (Default to Y) [Y,n]?
Permissions set on /var/www/cake3/tmp/cache
Permissions set on /var/www/cake3/tmp
Permissions set on /var/www/cake3/logs
Updated Security.salt value in config/app.php
46. CakePHP3 - セットアップ
# composer create-project --prefer-dist cakephp/app cake3
Installing cakephp/app (3.0.3)
- Installing cakephp/app (3.0.3)
Loading from cache
Created project in cake3
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing aura/installer-default (1.0.0)
Loading from cache
- Installing cakephp/plugin-installer (0.0.12)
Loading from cache
Writing lock file
Generating autoload files
Created `config/app.php` file
Set Folder Permissions ? (Default to Y) [Y,n]?
Permissions set on /var/www/cake3/tmp/cache
Permissions set on /var/www/cake3/tmp
Permissions set on /var/www/cake3/logs
Updated Security.salt value in config/app.php
CakePHP3のプロジェクトテンプレートを
ダウンロードしてcomposer installする。
48. CakePHP3 - bake
# bin/cake bake
Welcome to CakePHP v3.0.7 Console
---------------------------------------------------------------
App : src
Path: /var/www/cake3/src/
---------------------------------------------------------------
The following commands can be used to generate skeleton code for your application.
Available bake commands:
- all
- behavior
- cell
- component
- controller
- fixture
- form
- helper
- migration
- migration_snapshot
- model
- plugin
- shell
- template
- test
By using `cake bake [name]` you can invoke a specific bake task.
いろいろ作れる。
うまく使うと便利。