File: /mnt/data/ghayatcom/ghayatcom-api/app/Http/Resources/SickLeaveCertificateResource.php
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* App\Http\Resources
*
* @property integer $id
* @property mixed $appointment_id
* @property mixed $patient_copy
* @property mixed $employer_copy
* @property mixed $patient_copy_url
* @property mixed $employer_copy_url
* @property mixed $medical_note
* @property mixed $pdf
*/
class SickLeaveCertificateResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'appointment_id' => $this->appointment_id,
'patient_certificate' => $this->patient_certificate,
'employer_certificate' => $this->employer_certificate,
'medical_note' => isset($this->medical_note) ? $this->medical_note : "",
'medical_notes_pdf' => $this->pdf,
'patient_copy_url' => $this->patient_copy_url,
'employer_copy_url' => $this->employer_copy_url,
];
}
}