Fixed incorrect counts due to the left-join

This commit is contained in:
bwilliams committed 2022-02-22 13:18:23 +00:00
1 parent e62e71ab6c
commit e825050814
1 file changed
+24
+24
View File
@@ -82,4 +82,28 @@ class UserSprunje extends UFUserSprunje
return $this; return $this;
} }
/**
* Get the unpaginated count of items (before filtering) in this query.
*
* @param Builder $query
*
* @return int
*/
protected function count($query)
{
return $query->distinct('users.id')->count();
}
/**
* Get the unpaginated count of items (after filtering) in this query.
*
* @param Builder $query
*
* @return int
*/
protected function countFiltered($query)
{
return $query->distinct('users.id')->count();
}
} }