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

NEW Laravel (Unofficial) API Starter Kit: Built by Me and Fable 5
1.7K views

Laravel Starter Kits: 5 NEW Features You May Have Missed
3.2K views

Optimize Laravel E-Shop Homepage Speed with... Livewire?
2.0K views

Laravel Cloud Pricing: HUGE Update (for smaller projects)
4.2K views

NativePHP: My Android App is on Play Store! (+new YouTube channel)
9.1K views

Laravel AI SDK: "Sensitive" Data in Prompts and AI Dashboard Package
2.0K views