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

attach to a model which database is not on the host where attachments table is located #33

Open
Legomegger opened this issue Jun 15, 2021 · 1 comment

Comments

@Legomegger
Copy link

Hello, thank you such convenient library! I faced an issue where my model (User) to which I attach my file, locates outside. And therefore User->attachments() doesnt work, because in remote database table attachments doesnt exist. Is there any workaround? Thanks!

@gabsource
Copy link
Member

Hi !

This package has not been tested with this configuration.

Maybe you can try overriding the Attachment model (via the config) with you own class that extends Attachment and which overrides the connection property so that Eloquent knows in which database the model's data are persisted.

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

No branches or pull requests

2 participants