From that error message it sounds like it is not specific to Laravel or Postgres, but due to the private .internal DNS record not resolving. And hence anything relying on that domain (in your case a database query) would fail.
I wonder if this issue has resurfaced? It certainly sounds similar: