--- title: 'Use aggregate methods to count related models' tweet_id: '1464247626405060616' thread_slug: weekly-thread-2021-47 author_username: alexjgarrett images: - 'https://pbs.twimg.com/media/FEy-iNNX0AYjL56.jpg' created_at: 2021-11-26T15:00:13+00:00 slug: use-aggregate-methods-to-count-related-models --- 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.