public function findWithCount(Query $query, array $options) { $query->select(['count' => $query->func()->count('Users.id')]); $query->matching('Users'); $query->group(['UserRoles.id']); return $query; }
public function findUniqueVisitors(Query $query, array $options) { $query->group('Requests.visitor_id'); return $query; }