David Carrdcblog.devยทSep 13, 2021Using Laravel's withCount to count a sub queryUsing Laravel's withCount to count a subquery When you need to could a subquery Laravel provides a useful withCount method that is perfect. Take an example of a user who can have records with a hasMany relationship: I have a model called BookingCandi...120 readsLaravelAdd a thoughtful commentNo comments yetBe the first to start the conversation.