🔥 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 upsert method
May 2, 2022