Saturday, 13 March 2021

Laravel ENV() function

 


    'default' => env('DB_CONNECTION', 'mysql'),

This means it will read DB_CONNECTION variable from .env file, as long as there is DB_CONNECTION string, no value it will be null. 'mysql' from connections array in config/database.php is only used when there is no such DB_CONNECTION string


https://stackoverflow.com/questions/27755602/pdo-connection-refused-with-laravel-but-not-with-con-new-pdo



No comments:

Post a Comment