Код: Выделить всё
.envКод: Выделить всё
DB_DATABASE=mydb
DB_USERNAME=myuser
< /code>
config/database.phpКод: Выделить всё
'mysql' => [
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
]
< /code>
I get this error:
PDOException: SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)
< /code>
Not pulling in my env config. This is affecting every single one of my config files, including third parties such as Bugsnag.
I also tried
php artisan config:clear
php artisan cache:clear
< /code>
[b]Update[/b]
Trying php artisan tinkerКод: Выделить всё
>>> env('DB_DATABASE')
=> null
>>> getenv('DB_DATABASE')
=> false
>>> config('database.connections.mysql.database')
=> "forge"
>>> dd($_ENV)
[]
< /code>
I have tried installing a fresh copy of Laravel 5.2. I only copied it into my appПодробнее здесь: https://stackoverflow.com/questions/344 ... o-env-file
Мобильная версия