Fixed incorrect counts due to the left-join
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user