12 Days of Eloquent - Ron Northrip
2025-12-29
Laravel, Eloquent, polymorphic relationships, tutorial, Laravel News, holiday
Ron wrote a holiday tutorial for Laravel News: 12 Days of Eloquent.
It builds a Laravel artisan command that “sings” The Twelve Days of Eloquent. Along the way it works through polymorphic many-to-many relationships: breaking the song into reusable “singable” pieces, wiring up MorphToMany and MorphTo, pulling the relationship into a shared CanBeSung trait, and eager loading to assemble each verse.
Read the full tutorial on Laravel News →
