Hey, my book is finally available. Find it here.  Eloquent Beyond The Basics!

🔥 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.
tip-image-0