Skip to content

Commit ddc4d23

Browse files
Celanttaylorotwell
andauthored
[8.x] add details about environment-specific .env files (#7464)
* add details about APP_ENV-specific .env files * Update configuration.md Co-authored-by: Taylor Otwell <[email protected]>
1 parent 3d3f080 commit ddc4d23

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

configuration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ If you are developing with a team, you may wish to continue including a `.env.ex
3535

3636
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.
3737

38+
<a name="additional-environment-files"></a>
39+
#### Additional Environment Files
40+
41+
Before loading your application's environment variables, Laravel determines if either the `APP_ENV` environment variable has been externally provided or if the `--env` CLI argument has been specified. If so, Laravel will attempt to load an `.env.[APP_ENV]` file if it exists. If it does not exist, the default `.env` file will be loaded.
42+
3843
<a name="environment-variable-types"></a>
3944
### Environment Variable Types
4045

0 commit comments

Comments
 (0)