Use aggregate methods to count related models
- ·
- Telegram
- ·
- Newsletter
When you're counting related models in @laravelphp, opt for aggregates!
👎 Using the count() method on a collection of related models is a tad slower.
When you're counting related models in @laravelphp, opt for aggregates!
👎 Using the count() method on a collection of related models is a tad slower.
We're writing a book, you can get it for free here. We're writing a book! Join the early access to get it for free.