Spencer O'Reilly
Spencer O'Reilly

Reputation: 545

Is there a suggested list of values for Laravel's APP_ENV variable (found in the .env file)?

I can't seem to find any sort of official list of the APP_ENV variable in the .env file. In practice I've used local, dev, development, staging, and production. And I feel like this works okay... and I've even seen some of these used by other prominent Laravel developers. However I'd feel much more confident if there was a standard. Is there a PSR standard that defines environment names? Or maybe some Laravel documentation I'm missing?

Upvotes: 28

Views: 19174

Answers (2)

cweiske
cweiske

Reputation: 31147

We use local/development/staging/production.

Upvotes: 4

Augusto Moura
Augusto Moura

Reputation: 1427

As far as I know, only local, testing and production are standard, because the Illuminate/Foundation/Application class contains the methods isLocal(), runningUnitTests() and isProduction() for checking them.

Upvotes: 46

Related Questions