Skip to content

Commit b387763

Browse files
committed
wip
1 parent 545277e commit b387763

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Handler/Concerns/IncludesData.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ private function loadRelationships(array $models, array $include, Request $reque
116116

117117
foreach ($trails as $relationships) {
118118
if ($loader = end($relationships)->loader) {
119+
// TODO: probably need to loop through relationships here
119120
($loader)($models, false);
120121
} else {
121122
$adapter->load($models, $relationships);

src/Serializer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ private function addToMap(ResourceType $resource, $model, array $include)
5353

5454
ksort($fields);
5555

56+
$key = $data['type'].':'.$data['id'];
57+
5658
foreach ($fields as $name => $field) {
59+
if (isset($this->map[$key]['fields'][$name])) {
60+
continue;
61+
}
62+
5763
if (! ($field->isVisible)($this->request, $model)) {
5864
continue;
5965
}

0 commit comments

Comments
 (0)