Skip to content

Commit 9b67227

Browse files
committed
Wip
1 parent 1e41ca7 commit 9b67227

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traits/ReviewRateable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,8 @@ public function ratingCounts(?string $department = null, bool $approved = true):
390390

391391
$rawCounts = Rating::select('value', DB::raw('count(*) as count'))
392392
->whereHas('review', function ($q) use ($reviewQuery) {
393-
$sql = $reviewQuery->toBase()->getQuery()->toSql();
394-
$bindings = $reviewQuery->getBindings();
393+
$sql = $reviewQuery->toBase()->toSql();
394+
$bindings = $reviewQuery->toBase()->getBindings();
395395
$q->from(DB::raw("({$sql}) as reviews_sub"))
396396
->whereColumn('reviews_sub.id', 'ratings.review_id');
397397
foreach ($bindings as $i => $b) {

0 commit comments

Comments
 (0)