We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b1b076 commit 1e09fa5Copy full SHA for 1e09fa5
src/Laravel/EloquentResource.php
@@ -67,7 +67,7 @@ protected function getRelationshipValue(Model $model, Relationship $field, Conte
67
{
68
$method = $this->method($field);
69
70
- if (method_exists($model, $method)) {
+ if ($model->isRelation($method)) {
71
$relation = $model->$method();
72
73
// If this is a belongs-to relationship, and we only need to get the ID
0 commit comments