Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Apr. 12th 2017

Let's Build A Forum with Laravel and TDD: Global Scopes and Further Query Reduction

Episode 21 Run Time 8:28

Download

In this episode, we'll continue optimizing our SQL queries. Specifically, we'll review global Eloquent scopes and the useful $with property to automatically eager load any necessary relationships.

View the source code for this lesson on GitHub.