LoginSignup
9
3

More than 5 years have passed since last update.

CakePHP3をインストールしたらとりあえずやってること

Posted at

随時更新。

# composerからインストールしている前提
# app.phpに変更が必要なものは適宜app.default.phpにも変更をかける

DB

config/app.default.php
            'username' => 'username',
            'password' => 'password',
            'database' => 'database',

Security Salt

$ cat /dev/urandom | LC_CTYPE=C tr -dc '[:alnum:]' | head -c 64

config/app.default.php
        'salt' => env('SECURITY_SALT', 'GENERATED_SALT'),

Locale

config.bootstrap.php
            'timezone' => 'Asia/Tokyo',
config/app.default.php
            'timezone' => 'Asia/Tokyo',
config/app.default.php
        'defaultLocale' => env('APP_DEFAULT_LOCALE', 'ja-JP'),

composer

cakephp-codesnifferをrequire-devに追加。

composer.json
        "cakephp/cakephp-codesniffer": "2.*"

.editorconfig

[*.sql]
indent_style = space
indent_size = 2

その他

publicの不要ファイル削除。
webroot/fileディレクトリ作成。
favicon.ico設置。

scss用に.editorconfigを修正、.scss-lint.yml作成、ディレクトリとbase.scssを追加。
normalize.css導入。

font-awesome, bootstrap, jqueryあたりを導入。

9
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
3