Skip to content

Commit

Permalink
Update InteractsWithTableQuery.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Mar 17, 2024
1 parent 5ec7f37 commit 0a6edd9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ protected function getSortColumnForQuery(EloquentBuilder $query, string $sortCol

if (! $relationship) {
// Treat the missing "relationship" as a JSON column if dot notation is used in the column name.
return (string) str($relationshipName)
return (string) str($relationshipName ?? $this->getRelationshipName())
->append('.')
->append($sortColumn)
->replace('.', '->');
Expand Down

0 comments on commit 0a6edd9

Please sign in to comment.