Keeping Secrets Out of Git: .env, APP_KEY and APP_DEBUG
Laravel's documentation says the .env file should not be committed to source control. Keep APP_KEY and database credentials in the environment, set APP_DEBUG to false in production, and after config:cache only call env() from config files. If you need a file in git, use php artisan env:encrypt and store the decryption key in a password manager.
