Skip to content
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

Using passthrough of model connection. #37

Merged
merged 3 commits into from
Jul 31, 2022
Merged

Conversation

ryangurn
Copy link
Contributor

@ryangurn ryangurn commented Jul 31, 2022

Code change for #36.

This will allow for multiple database connections where the connection from the model with the versionable trait will pass through to the version model.

It does require that the version table exists in any database with a table that is versionable but that is the intent of this change.

When there is no connection specied (ie: null connection name) Laravel will just use the default connection.

This will allow for multiple database connections where the connection from the model with the versionable trait will pass through to the version model.

It does require that the version table exists in any database with a table that is versionable but that is the intent of this change.

When there is no connection specied (ie: null connection name) Laravel will just use the default connection.
@ryangurn ryangurn changed the title Using passthrough of model connection. (Fix for #36) Using passthrough of model connection. Jul 31, 2022
@overtrue overtrue merged commit 8e98183 into overtrue:4.x Jul 31, 2022
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.

2 participants