As @bestmomo says, something weird is going on. The "return" on the previous post says "If you can't find APP_ENV in the .env file, then set the environment to "production". Is your .env file actually named .env? If you are trying to to call it .env.local.php or anything other than exactly .env (not event .env.php will work) then it won't be read.
You could test this by doing this...
In your .env. file
TEST_SETTING=hello
Then try this in a PHP file from a web browser
echo env('TEST_SETTING', 'Oops, I could not find that setting');
If you see 'hello', then it's at least seeing your .env file. If you see the other message, then .env is not even loading.