Skip to content

Commit

Permalink
Merge pull request #194 from art-institute-of-chicago/feature/counting
Browse files Browse the repository at this point in the history
Retrieve correct record counts for augmented models
  • Loading branch information
nikhiltri authored Aug 4, 2023
2 parents 0b6dbc6 + 34de7fd commit aedeafb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Repositories/Api/BaseApiRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getCountByStatusSlug(string $slug, array $scope = []): int
$query = $this->model->newQuery();
switch ($slug) {
case 'all':
return $query->count();
return $this->model->getApiModel()->newQuery()->count();
case 'published':
return $query->published()->count();
case 'draft':
Expand Down

0 comments on commit aedeafb

Please sign in to comment.