Skip to content

Commit 8b1dfae

Browse files
committed
Add missing count method
1 parent fa0b28f commit 8b1dfae

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Repositories/AbstractRepository.php

+14
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,20 @@ public function all($columns = ['*'])
349349
return $this->query->get($columns);
350350
}
351351

352+
/**
353+
* Retrieve the "count" result of the query.
354+
*
355+
* @param array $columns
356+
*
357+
* @return int
358+
*/
359+
public function count($columns = ['*'])
360+
{
361+
$this->newQuery();
362+
363+
return $this->query->count($columns);
364+
}
365+
352366
/**
353367
* Get an array with the values of a given column.
354368
*

0 commit comments

Comments
 (0)