We've made it to the scariest of Eloquent relations: polymorphic. Don't worry! As with most things, the word is scarier than the technique. A polymorphic relationship allows a model to belong to any number of models on a single association. Let's demonstrate this with a practical example.
Published on Sep 3rd, 2018.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.