Skip to content

Instantly share code, notes, and snippets.

@almino
Created October 19, 2019 01:14
Show Gist options
  • Save almino/4e26745de5bb1ea7e1cb56a52c4b586d to your computer and use it in GitHub Desktop.
Save almino/4e26745de5bb1ea7e1cb56a52c4b586d to your computer and use it in GitHub Desktop.
Preparar arquivos de configuração do Laravel para usar variáveis de ambiente

Substituir configurações que NÃO tem valor padrão

env\(('\w+')\)
env($1, $_ENV[$1])

Substituir configurações que TEM valor padrão

env\(('\w+'), (['\w\.@]+)\)
env($1, $_ENV[$1] ?? $2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment