-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two connections to Postgres and MongoDB PHP 5.4 #38
Comments
If you use pgsql as the default driver, you will need to tell your mongodb model to use the mongodb connection. You do this by setting the connection attribute. |
Yes! thanks Jean Just do not understand why this is not so in PHP 5.3, but that is another problem :) |
This was referenced Nov 26, 2018
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Jens,
In our application (Laravel4) use two connections to Postgres databases and MongoDB.
Using PHP 5.3 we had no problems, but using PHP 5.4.9 have a problem with the instance of the connection to the DB you are getting 'jenssegers/mongodb/src/Jenssegers/Mongodb/Model.php'. I do not understand why it is that you are getting the connection to the Postgres database in 5.4 but work in 5.3.
We tested the PHP Mongo client 5.4 on a standalone application and it works.
The exception is:
In my case I have defined:
Provider:
Alias of the Laravel Eloquent Model:
Example of a Jenssegers model:
And finally,
The connections to the DB:
The text was updated successfully, but these errors were encountered: