Extending Media Model #510
Answered
by
nickwild-999
nickwild-999
asked this question in
Q&A
-
I am struggling with extending the Media model to add new resolutions for social media images. I have the Extended model working, but although it is returning the new image from the Media model directly it is not being returned from a linked Post table. I would be grateful for any thoughts. Extended Media model
Controller
Post model
|
Beta Was this translation helpful? Give feedback.
Answered by
nickwild-999
Jul 28, 2024
Replies: 1 comment 4 replies
-
try this, since the container is trying to bind to a model called 'Media': use Awcodes\Curator\Models\Media as BaseMedia;
class Media extends BaseMedia
{} |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks Adam, it also worked like that for me when querying ExtendedMedia directly, but I also needed to be able to query from PostController.
I discovered that I needed to add the following to my
PostController
for it to appear.So my PostController now reads