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 aae7cca commit 5b7afafCopy full SHA for 5b7afaf
src/Serializer.php
@@ -119,11 +119,11 @@ protected function serializeModel(ResourceInterface $model)
119
if (in_array($name, $included)) {
120
$data['relationships'][$name]['data'] = $relationship;
121
}
122
- }
123
- if ($model instanceof LinksInterface) {
124
- $links = $model->getRelationshipLinks($name);
125
- if (!empty($links)) {
126
- $data['relationships'][$name]['links'] = Link::serialize($links);
+ if ($model instanceof LinksInterface) {
+ $links = $model->getRelationshipLinks($name);
+ if (!empty($links)) {
+ $data['relationships'][$name]['links'] = Link::serialize($links);
+ }
127
128
129
0 commit comments