Skip to content

Commit 0f6cc50

Browse files
committed
#14 strip out null values in model toArray
the POST bulletintags endpoint of the api does not like getting id:null, other endpoints ignore it
1 parent db461ca commit 0f6cc50

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Models/CarouselModel.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ public function toArray()
107107
->map(function($property){
108108
return $this->flattenRelationships($property);
109109
})
110+
->reject(function($property){
111+
return is_null($property);
112+
})
110113
->toArray();
111114

112115
return $properties;

0 commit comments

Comments
 (0)