Skip to content

Commit 86a3a3f

Browse files
committed
Merge branch 'intech-6.0' into 6.0
2 parents 4aa15f0 + ae65d28 commit 86a3a3f

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

src/Engines/BaseEngine.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ public function setSerializer($serializer)
584584
*/
585585
public function make($mDataSupport = false, $orderFirst = false)
586586
{
587-
$this->totalRecords = $this->count();
587+
$this->totalRecords = $this->totalCount();
588588

589589
if ($this->totalRecords) {
590590
$this->orderRecords(! $orderFirst);
@@ -603,6 +603,13 @@ public function make($mDataSupport = false, $orderFirst = false)
603603
*/
604604
abstract public function count();
605605

606+
/**
607+
* Count total items
608+
*
609+
* @return integer
610+
*/
611+
abstract public function totalCount();
612+
606613
/**
607614
* Sort records.
608615
*

src/Engines/CollectionEngine.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ public function count()
8686
{
8787
return $this->collection->count();
8888
}
89+
90+
/**
91+
* @inheritdoc
92+
*/
93+
public function totalCount()
94+
{
95+
return $this->count();
96+
}
8997

9098
/**
9199
* @inheritdoc

src/Engines/QueryBuilderEngine.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ public function count()
8585
return $this->connection->table($this->connection->raw('(' . $myQuery->toSql() . ') count_row_table'))
8686
->setBindings($myQuery->getBindings())->count();
8787
}
88+
89+
/**
90+
* @inheritdoc
91+
*/
92+
public function totalCount()
93+
{
94+
return $this->count();
95+
}
8896

8997
/**
9098
* @inheritdoc

0 commit comments

Comments
 (0)