Skip to content

Commit

Permalink
fix: check if relations method exists on correct object
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke committed Sep 2, 2020
1 parent f903325 commit 0280c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/Concerns/AllowsExpansion.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private function checkExpansionIsValid(string $expansion): bool
continue;
}

if (method_exists($model, $expansionString)) {
if (method_exists($model->expandableRelations(), $expansionString)) {
list('model' => $nextClass, 'isAuthorized' => $authorizationFn) = $model->expandableRelations()
->{$expansionString}();

Expand Down

0 comments on commit 0280c4d

Please sign in to comment.