-
-
Save ricardoaugusto/c28946c1c3fa6ed40b67edbbdf9f062b to your computer and use it in GitHub Desktop.
Connect to Laravel Homestead MySQL from inside and outside the host machine. https://medium.com/@morrislaptop/connect-to-laravel-homestead-mysql-from-inside-and-outside-the-host-machine-a117b3ba75f2
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
<?php | |
'mysql' => [ | |
'driver' => 'mysql', | |
'host' => env('DB_HOST', 'homestead' == gethostname() ? 'localhost' : '127.0.0.1'), | |
'database' => env('DB_DATABASE', 'forge'), | |
'username' => env('DB_USERNAME', 'homestead'), | |
'password' => env('DB_PASSWORD', 'secret'), | |
'port' => env('DB_PORT', 'homestead' == gethostname() ? null : 33060), | |
'charset' => 'utf8mb4', | |
'collation' => 'utf8mb4_unicode_ci', | |
'prefix' => '', | |
'strict' => true, | |
'engine' => null | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment