Skip to content

Commit

Permalink
Update CanSummarizeRecords.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Dec 21, 2023
1 parent 4da464d commit 88e5bb1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/tables/src/Concerns/CanSummarizeRecords.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Closure;
use Filament\Support\Services\RelationshipJoiner;
use Illuminate\Database\Connection;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Query\Expression;
use Illuminate\Support\Facades\DB;
Expand Down Expand Up @@ -43,7 +44,10 @@ public function getTableSummarySelectedState(Builder $query, ?Closure $modifyQue
continue;
}

$qualifiedAttribute = $query->getConnection()->getTablePrefix() . $query->getModel()->qualifyColumn($column->getName());
/** @var Connection $queryConnection */
$queryConnection = $query->getConnection();

$qualifiedAttribute = $queryConnection->getTablePrefix() . $query->getModel()->qualifyColumn($column->getName());

foreach ($summarizers as $summarizer) {
if ($summarizer->hasQueryModification()) {
Expand Down

0 comments on commit 88e5bb1

Please sign in to comment.