Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Kaustubh's avatar

Connection refused in curl

i have two laravel projects, In Project 1 i am calling api from curl in project 2, In project 2 there is Sql Query which is not working when i call api from project 1, but this api works in postman and in core php.

As i come to know that when i call api from project 1 to project 2 it keeps project1 database connection in project 2

ERROR: (In Laravel.log)

Table not found.

0 likes
2 replies
Nakov's avatar

@kaustubh so in your project2 check your .env file do you have a different name for the DB_DATABASE key?

Kaustubh's avatar

yes Project 2 uses different database connection.

Please or to participate in this conversation.