Answer the question
In order to leave comments, you need to log in
How to get all entities to which a certain tag is connected in Laravel?
There are models for articles, images and videos. More will be added in the future.
These models have the HasTag trait, which establishes a Many To Many (Polymorphic) relationship with Tags.
The list of all models that use the HasTag trait is unknown.
Let's say we have a "Food" tag that is connected to many article, video, and image entities.
How can I get all entities that have the "Food" tag attached to them? Presumably, this functionality will be located in the Helper.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question