Skip to content

Commit

Permalink
Add missing count method
Browse files Browse the repository at this point in the history
  • Loading branch information
Torann committed May 20, 2017
1 parent fa0b28f commit 8b1dfae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Repositories/AbstractRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 8b1dfae

Please sign in to comment.