Reputation: 13562
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
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