Skip to content

Commit ea00a19

Browse files
authored
Merge pull request #82 from yurykabanov/fix-get-all-records
Fix issue with retrieving every single id to count them (fix #81)
2 parents 54267b1 + f943cac commit ea00a19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NilPortugues/Laravel5/JsonApi/Controller/JsonApiTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function totalAmountResourceCallable()
6363
return function () {
6464
$idKey = $this->getDataModel()->getKeyName();
6565

66-
return $this->getDataModel()->query()->get([$idKey])->count();
66+
return $this->getDataModel()->query()->count([$idKey]);
6767
};
6868
}
6969

0 commit comments

Comments
 (0)