🔥 Laravel Tip: Custom Polymorphic Types
Apr 7, 2022
Usually, when using polymorphic relationships, Laravel will store the class type like this "App\Models\Video" but you can change that behavior by adding mappings.
This way the relationships don't fail even if the models are renamed.
This way the relationships don't fail even if the models are renamed.
Other tips:
🔥 Laravel tip: The `whereRelation` method
Oct 18, 2022
🔥 Laravel tip: the sole method
Feb 15, 2022