Skip to content

Commit 8a2cbfb

Browse files
[Docs] Update example in schema chapter (#453)
1 parent bca935e commit 8a2cbfb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/basics/schemas.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class Schema extends SchemaProvider
211211
return [
212212
'author' => [
213213
self::DATA => function () use ($post) {
214-
return $post->createdBy;
214+
return $post->author;
215215
},
216216
],
217217
];
@@ -256,7 +256,7 @@ class Schema extends SchemaProvider
256256
'author' => [
257257
self::SHOW_DATA => isset($includeRelationships['author']),
258258
self::DATA => function () use ($post) {
259-
return $post->createdBy;
259+
return $post->author;
260260
},
261261
],
262262
];
@@ -337,7 +337,7 @@ class Schema extends SchemaProvider
337337
self::SHOW_RELATED => true,
338338
self::SHOW_DATA => isset($includeRelationships['author']),
339339
self::DATA => function () use ($post) {
340-
return $post->createdBy;
340+
return $post->author;
341341
},
342342
],
343343
];

0 commit comments

Comments
 (0)