Skip to content

Commit e5d5cac

Browse files
authored
Merge pull request #4717 from Laravel-Backpack/avoid-selecting-the-column
don't select the column, only count the results
2 parents ebbe9a1 + 3ad5272 commit e5d5cac

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/app/Library/CrudPanel/Traits/Query.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,6 @@ private function getCountFromQuery(Builder $query)
314314
// create an "outer" query, the one that is responsible to do the count of the "crud query".
315315
$outerQuery = $crudQuery->newQuery();
316316

317-
// in this outer query we will select only one column to be counted.
318-
$outerQuery = $outerQuery->select($this->model->getKeyName());
319-
320317
// add the count query in the "outer" query.
321318
$outerQuery = $outerQuery->selectRaw('count(*) as total_rows');
322319

0 commit comments

Comments
 (0)