Laravel .env in AWS Elastic Beanstalk

Viewed 947

I have deployed my Laravel application to AWS Beanstalk. I also connected CodePipeline for automatic deployment. As I have multiple environments (staging, testing, production) I want to use AWS Elastic Beanstalk environment variables for different environments. However, when I write my own variables to elastic beanstalk configuration and I dd(config('app.env')), it prints "production" instead of "staging". How can I fix this problem? Thanks in advance!

P.s: I also removed the .env file manually, it still did not work.

env

1 Answers

Amazon first check it's global variables (google it pls) and then refers to laravel .env file variables

Related