public function linkTo(\Thru\TutumApi\Models\Service $service, $alias = null, Stack $stack = null) { $link = new \StdClass(); $link->to_service = $stack instanceof Stack ? $service->getName() . "." . $stack->getName() : $service->name; $link->name = $alias ? $alias : $service->name; $this->linkedToService[] = $link; return $this; }