Skip to content

Commit

Permalink
Update SpladeQueryBuilder.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed Mar 17, 2024
1 parent 89b5516 commit 5a1b48f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SpladeQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private function applySorting(Column $column)
);
}

if (!method_exists($this->builder, 'orderByLeftPowerJoins')) {
if (!trait_uses_recursive($this->builder->getModel(), PowerJoins::class)) {
throw new PowerJoinsException(
"To order the query using a column from a relationship, make sure the Model uses the 'PowerJoins' trait."
);
Expand Down

0 comments on commit 5a1b48f

Please sign in to comment.