diff --git a/src/Laravel/EloquentResource.php b/src/Laravel/EloquentResource.php index 0695409..fe515f0 100644 --- a/src/Laravel/EloquentResource.php +++ b/src/Laravel/EloquentResource.php @@ -67,7 +67,7 @@ protected function getRelationshipValue(Model $model, Relationship $field, Conte { $method = $this->method($field); - if (method_exists($model, $method)) { + if ($model->isRelation($method)) { $relation = $model->$method(); // If this is a belongs-to relationship, and we only need to get the ID