Skip to content

Conversation

gmsarates
Copy link

Some models can connect to different databases, but the visitors still connecting on the default DB connection.
To solve this, I've created the config file which contains the DB connection. With this, you can change this config on demand.

Controller:

config(['visitors.connection' => 'new_connection']);
$model->visit();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant