cre8
cre8

Reputation: 13562

Lumen uses .env file from laravel when using curl

I have an application with laravel and one with lumen, both have different databases.

When I make a post call via postman to lumen, it is unsing his own database.

But when I do a curl call from laravel with ixudra/curl lumen tries to use the database name that is written in the laravel/.env file from the laravel project and not the lumen/.env. Is it because both the config is cached globally with php so lumen think it has already loaded it and is using the one from laravel instead?

Lumen has no config folder I can't hardcode the value there.

Any ideas??

Upvotes: 1

Views: 1001

Answers (1)

ayip
ayip

Reputation: 2543

You can create a config folder in your lumen app, and copy the database.php file from vendor/laravel/lumen-framework/config/database.php, this way you can make necessary changes to your database configuration, if required.

Upvotes: 1

Related Questions