Introduction
All of the configuration files for the Laravel framework are stored in the config directory. Each option is documented, so feel free to look through the files and get familiar with the options available to you.
config fileに全て入っているのは先ほど見た通りです。
Environment Configuration
It is often helpful to have different configuration values based on the environment where the application is running. For example, you may wish to use a different cache driver locally than you do on your production server.
ローカルのキャッシュドライバーを使えと言ってます。
To make this a cinch, Laravel utilizes the DotEnv PHP library by Vance Lucas. In a fresh Laravel installation, the root directory of your application will contain a .env.example file. If you install Laravel via Composer, this file will automatically be renamed to .env. Otherwise, you should rename the file manually.
.envファイルは大事です。
app, db, redis, mailなどの記載があります。
Your .env file should not be committed to your application’s source control, since each developer / server using your application could require a different environment configuration. Furthermore, this would be a security risk in the event an intruder gains access to your source control repository, since any sensitive credentials would get exposed.
git hubには.envはpushするなって書いてます。レポジトリを見ましたが、上がっていません。
If you are developing with a team, you may wish to continue including a .env.example file with your application. By putting place-holder values in the example configuration file, other developers on your team can clearly see which environment variables are needed to run your application. You may also create a .env.testing file. This file will override the .env file when running PHPUnit tests or executing Artisan commands with the –env=testing option.
teamなら.env.exampleを使えと言ってます。デフォルトでは.envと内容が一緒です。
Retrieving Environment Configuration
コード入力入っていきます。
'debug' => env('APP_DEBUG', false),
The current application environment is determined via the APP_ENV variable from your .env file. You may access this value via the environment method on the App facade:
Hiding Environment Variables From Debug Pages
debugのblackリストを設定できる?
return [ // ... 'debug_blacklist' => [ '_ENV' => [ 'APP_KEY', 'DB_PASSWORD', ], '_SERVER' => [ 'APP_KEY', 'DB_PASSWORD', ], '_POST' => [ 'password', ], ], ];