What if you need a single URL that could resolve to either a Post or a Page? You could handle it manually in the controller, or reach for polymorphic relationships, but there's a simpler option.
In this video, I walk through using Laravel's explicit route model binding to elegantly solve this problem with just a few lines of code.
And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.
Here to help,
Joel
P.S. Have a question about route model binding or anything else in Laravel? The Mastering Laravel community is a great place for this kind of discussion.