Skip to main content

"Black Friday" Discount! Only until December 1st: 50% off all membership plans!

Read more here
Quick Tip

Eager load relationship

If you use Route Model Binding and think you can't use Eager Loading for relationships, think again.

So you use Route Model Binding

public function show(Product $product) {
//
}

But you have a belongsTo relationship, and cannot use $product->with('category') eager loading?

You actually can! Load the relationship with ->load()

public function show(Product $product) {
$product->load('category');
//
}

Enjoyed This Tip?

Get access to all premium tutorials, video and text courses, and exclusive Laravel resources. Join our community of 10,000+ developers.

Recent Courses on Laravel Daily

Laravel Boost: Deeper Practical Dive

8 lessons
32 min

Marketing for Developers in 2026

7 lessons
52 min

Next.js Basics for Laravel Developers

11 lessons
58 min