public function hydrate($data) { parent::hydrate($data); if (!empty($this->company)) { $this->company = CompanyResponse::make($this->company); } }
public function hydrate($data) { parent::hydrate($data); if ($this->affiliate) { $this->affiliate = AffiliateResponse::make($this->affiliate); } if ($this->company) { $this->company = CompanyResponse::make($this->company); } if ($this->pixels) { $this->pixels = VisitorPixelsResponse::make($this->pixels); } }