'id' => $this->whenLoaded('parent', function() {
return $this->when($this->parent->relationLoaded('child1'), function() {
return $this->when($this->parent->child1->relationLoaded('child2'), function() {
return $this->parent->child1->child2->id;
});
});
}),