Support the ongoing development of Laravel.io →
Configuration Session Architecture

Hi all, I need to build a webservice between two laravel applications.

APP1 (local IP 127.0.1.1 and DB1 on .env file) APP2 (local IP 127.0.1.2 and DB2 on .env file)

In my APP1 there is a controller (api/token) that use DB facade to extract from my database some informations. This route work fine if I open it by http://127.0.1.1/api/token.

In my APP2 I have a call by CURL on that route but DB facade connect to the database of APP2 and doesn't found the table of the request.

How it is possible? It seems that the static method is execute on the APP2 server and its .env informations.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

franzgit franzgit Joined 20 Nov 2015

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.

© 2025 Laravel.io - All rights reserved.