Skip to content

Instantly share code, notes, and snippets.

@arkadiusjonczek
Created September 11, 2018 21:46
Show Gist options
  • Save arkadiusjonczek/3c28440cb2229d8cbc90d07ca312043a to your computer and use it in GitHub Desktop.
Save arkadiusjonczek/3c28440cb2229d8cbc90d07ca312043a to your computer and use it in GitHub Desktop.
Use Laravel CLI (Artisan) local host and inside docker container #tags: PHP, Laravel
# add into config/database.php above config array
# if you use docker with laravel
if (php_sapi_name() == 'cli' && getenv('APP_ENV') == 'local') {
putenv('DB_HOST=127.0.0.1');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment