confused about multiple databases #3221
-
So our Laravel app uses two databases:
I've created the I haven't overridden the default Media class, so that's still using the default connection ( Yet the following puts an entry into the Story::find(1)->addMedia('cake.jpg')->toMediaCollection('feature'); That's not a problem — it's actually what I'd hope for, I guess, but I'm confused whether I'm going about this the right way (particularly having the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can also have a main database that stores media models for different model on different databases, that would be done like this
And set this Model as default media model in the media library config... In that case, every model would store and retrieve it from you app database |
Beta Was this translation helpful? Give feedback.
You can also have a main database that stores media models for different model on different databases,
that would be done like this
And set this Model as default media model in the media library config...
In that case, every model would store and retrieve it from you app database