diff --git a/src/Repositories/AbstractRepository.php b/src/Repositories/AbstractRepository.php index becc5af..c574942 100755 --- a/src/Repositories/AbstractRepository.php +++ b/src/Repositories/AbstractRepository.php @@ -349,6 +349,20 @@ public function all($columns = ['*']) return $this->query->get($columns); } + /** + * Retrieve the "count" result of the query. + * + * @param array $columns + * + * @return int + */ + public function count($columns = ['*']) + { + $this->newQuery(); + + return $this->query->count($columns); + } + /** * Get an array with the values of a given column. *