Created
September 11, 2018 21:46
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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