Month: December 2022

Laravel Polymorphic Relationship: The Complete Guide

Laravel Polymorphic Relationship allows a model to belong to more than one other model on a single association. We will take an official Laravel documentation example for this tutorial. Let us take the example of “comment” in both posts and videos. Using polymorphic relationships, you can use a single comments table for both of these scenarios. By default, Laravel will […]