Fixed incorrect counts due to the left-join

This commit is contained in:
2022-02-22 13:18:23 +00:00
parent e62e71ab6c
commit e825050814

View File

@@ -82,4 +82,28 @@ class UserSprunje extends UFUserSprunje
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();
}
}