Vigyata.AI
Is this your channel?

Laravel Performance: Careful with withCount()

11.7K views· 531 likes· 6:57· Sep 14, 2025

🛍️ Products Mentioned (8)

An example of query optimization using withCount vs join, also adding cache on top. Links mentioned in this video: - Original tweet from Dries: https://x.com/driesvints/status/1965503985579950360 - PR from tweet: https://github.com/laravelio/laravel.io/pull/1350 - Laravel.io Portal: https://laravel.io/ - Laravel Docs on Counting Related Models: https://laravel.com/docs/12.x/eloquent-relationships#counting-related-models - My course "Laravel Eloquent: Expert Level" https://laraveldaily.com/course/laravel-eloquent-expert?mtm_campaign=youtube-withcount-join Support the channel by checking out my products: - My Laravel courses: https://laraveldaily.com/courses - Filament examples: https://filamentexamples.com - Livewire Kit Components: https://livewirekit.com Other places to follow: - My weekly Laravel newsletter: https://us11.campaign-archive.com/home/?u=a459401212599a54203d036ee&id=91c1337873 - My personal Twitter: https://twitter.com/povilaskorop

🎬 More from Laravel Daily