Skip to content

Commit

Permalink
feat(env): add docs about --env flag
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Jan 13, 2024
1 parent f11fc11 commit 7a289bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/database/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ DB_PASSWORD=root
DB_DATABASE=database
```

Let's focus in **DB_CONNECTION and DB_DEBUG** variables:
Let's focus on **DB_CONNECTION and DB_DEBUG** variables:

#### DB_CONNECTION

Expand Down
18 changes: 10 additions & 8 deletions docs/getting-started/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,16 @@ since any sensitive credentials would get exposed.
### Determining the current environment

Before loading your application's environment variables,
Athenna determines if either the `APP_ENV` environment
variable has been externally provided or if the `--env` Artisan
flag has been specified. If so, Athenna will attempt to load
the `.env.${APP_ENV}` file if it exists. If it does not exist,
Athenna will try to find the `APP_ENV` value inside the `.env` file,
if it exists, Athenna will save its value and repeat the process
above. Finally, if the `APP_ENV` is not present in the file,
Athenna will load the `.env` file by default if it exists.
Athenna determines if either the `--env` Artisan flag has
been specified or if the `APP_ENV` environment variable has
been externally provided.

If so, Athenna will attempt to load the `.env.${env}` or
`.env.${APP_ENV}` file if it exists. If the file cannot be
found, Athenna will try to find the `APP_ENV` variable inside
the `.env` file and again try to find the `.env.${APP_ENV}`
file to load. Finally, if the `APP_ENV` is not present in `.env` file,
Athenna will end up loading the `.env` file by default.

Running providing `--env` flag in Artisan:

Expand Down

0 comments on commit 7a289bf

Please sign in to comment.