Support the ongoing development of Laravel.io →
Configuration Testing
Last updated 2 years ago.
0

in config/database.php

[code] .... .... 'default' => 'sqlite_local', .... .... [/code]

or use the same name for each of them.

0

Hi! I have noticed the same problem: Environment configuration ovverides instead of cascading

I suppose that it will be fixed since the "config" path has changed twice in the recent commits in L5-dev.

0

I am suffering same issue with latest Laravel 5. Only one environment config is used regardless of what is the actual environment value.

It is critical defect as unit testing is not working. Having single environment in production is acceptable but not in dev machine.

Anyone able to fix it or suggest workaround?

0

I managed to build a dirty workaround also. I added below to my config/database.php

'default' => $app->environment()=='testing'?'sqlite':'mysql',

This does manual environment detection and is using different database when unit testing.

Last updated 9 years ago.
0

I got a good answer on this over on StackOverflow: http://stackoverflow.com/a/27986561/1210797

0

Sign in to participate in this thread!

Eventy

Your banner here too?

fredsted fredsted Joined 12 Dec 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.