How can I make withCount('comments')
also include all deleted/trashed rows?
For example, if I have 5 comments, and I delete 1, I still expect withCount('comments')
to return 5, but instead it's returning 4.
My full query looks something like this:
$query = Post::withTrashed()
->withCount('comments')
->get();