标签: php laravel
使用该类型查询后,我总是得到错误的计数
$category->with(['posts' => function ($q) { $q->allPublishedPosts(); }])->count()
如何在laravel中使用回调查询获得正确的行数和正确的行数?