Created
May 2, 2015 04:06
-
-
Save ikuwow/eb8c0f4e79cd292f1a5e to your computer and use it in GitHub Desktop.
CakePHP2をComposerでサクッとセットアップする ref: http://qiita.com/ikuwow/items/748613ba234415cc7b0b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/vendors | |
/plugins | |
/app/tmp/* | |
/app/Config/core.php | |
/app/Config/database.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CakePlugin::loadAll(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "example-app", | |
"repositories": [ | |
{ | |
"type": "pear", | |
"url": "http://pear.cakephp.org" | |
} | |
], | |
"require": { | |
"cakephp/cakephp": ">=2.6.4,<3.0.0" | |
}, | |
"require-dev": { | |
"phpunit/phpunit": "3.7.37", | |
"cakephp/debug_kit" : ">=2.2.4,<3.0.0" | |
}, | |
"config": { | |
"vendor-dir": "vendors/" | |
}, | |
"extra": { | |
"installer-paths": { | |
"./plugins/{$name}/": [ | |
"cakephp/debug_kit" | |
] | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir cakephpapp/ # アプリのディレクトリ作成 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vendors/bin/cake bake project app | |
Welcome to CakePHP v2.6.4 Console | |
--------------------------------------------------------------- | |
App : testcakephp2 | |
Path: /Users/degawaikuo/workspace/testcakephp2/ | |
--------------------------------------------------------------- | |
Skel Directory: /Users/degawaikuo/workspace/testcakephp2/vendors/cakephp/cakephp/lib/Cake/Console/Templates/skel | |
Will be copied to: /Users/degawaikuo/workspace/testcakephp2/app | |
--------------------------------------------------------------- | |
Look okay? (y/n/q) | |
[y] > y | |
--------------------------------------------------------------- | |
Created: app in /Users/degawaikuo/workspace/testcakephp2/app | |
--------------------------------------------------------------- | |
* Random hash key created for 'Security.salt' | |
* Random seed created for 'Security.cipherSeed' | |
* Cache prefix set | |
* app/Console/cake.php path set. | |
CakePHP is not on your `include_path`, CAKE_CORE_INCLUDE_PATH will be hard coded. | |
You can fix this by adding CakePHP to your `include_path`. | |
* CAKE_CORE_INCLUDE_PATH set to /Users/degawaikuo/workspace/testcakephp2/vendors/cakephp/cakephp/lib in webroot/index.php | |
* CAKE_CORE_INCLUDE_PATH set to /Users/degawaikuo/workspace/testcakephp2/vendors/cakephp/cakephp/lib in webroot/test.php | |
* Remember to check these values after moving to production server | |
Project baked successfully! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd app/webroot | |
$ php -S localhost:8989 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git init | |
$ git add . | |
$ git commit -m'initial commit' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// これを | |
// define('CAKE_CORE_INCLUDE_PATH', DS . 'Users' . DS . 'username'. DS . 'testcakephp2' . DS . 'vendors' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib'); | |
// こうする | |
define('CAKE_CORE_INCLUDE_PATH', ROOT. DS . 'vendors' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment