user ? $this->user->sFirstName .' '. $this->user->sLastName : '-'; $data = [ 'id' => $this->nID, 'patient_name' => $patientName, 'livechat' => $this->livechat, 'prescription_code' => $this->sKodeResep, 'date_consultation' => $this->dTanggalResep ? Carbon::parse($this->dTanggalResep)->format('Y-m-d H:i:s') : null, 'doctor_name' => $this->sDokterName ? $this->sDokterName : '-', 'items' => $this->items ? $this->items : [], 'status_prescription' => $this->status_prescription ]; return $data; } }