Answer the question
In order to leave comments, you need to log in
Why doesn't DB_CONNECTION work in Laravel 5.3?
Introductory: judging by the documentation and publications on the Internet , this variable in Laravel must somehow replace the name of the default settings in config.database.default. However, this doesn't work, and we couldn't find such logic in the Laravel code either.
Question: How can I set the default database settings name value for PhpUnit tests? The variable mentioned above is set via <env name="DB_CONNECTION" value="testing"/>
, everything is great, but it does not affect anything.
Clarification: the connection settings themselves with the name (key in the config) testing, of course, are available. Also, it was not possible to find a mention of the DB_CONNECTION environment variable in the framework code.
Answer the question
In order to leave comments, you need to log in
This is not a database name.
This is the name of the key in the config (array /config/database.php/connections) with the connection parameters that will be used.
Create an appropriate section and use
Also, it was not possible to find a mention of the DB_CONNECTION environment variable in the framework code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question