public function hydrate($data) { parent::hydrate($data); if (!empty($this->employee)) { $this->employee = EmployeeResponse::make($this->employee); } }
public function hydrate($data) { parent::hydrate($data); if (!empty($this->department)) { $this->department = DepartmentResponse::make($this->department); } if (!empty($this->customer)) { $this->customer = CustomerResponse::make($this->customer); } if (!empty($this->currentAgent)) { $this->currentAgent = EmployeeResponse::make($this->currentAgent); } }