The normal use of polymorphic relationships in Laravel is covered pretty well by the Post/User/Image explanation.
I’m trying to find a clean way to implement relationships for let’s say an Article/ContentA/ContentB relationship.
An article has many Content types that implement a specific interface. I haven’t been able to find a simple way to do this that would allow me to simply call
$article->contents the way I could call $post->images, and also allow for me to to easily extend the relationship to a ContentC.
from Newest questions tagged laravel-5 – Stack Overflow http://ift.tt/1Z9OGm5