Need Assistance?

support@tutorialshub.in

Eloquent Relationships

Counting & Querying Related Models

ADVERTISEMENT
Laravel Free Lesson
5 min read
ADVERTISEMENT

Need to show how many lessons each chapter has without loading all lesson rows? Use withCount('pages')—it adds a pages_count attribute directly in SQL!

ADVERTISEMENT
Hi, I'm Tuby! Here to help you