Update Doctor Resource
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Modules\Linksehat\Transformers;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Route;
|
||||
|
||||
class PractitionerRoleToDoctorResource extends JsonResource
|
||||
{
|
||||
@@ -41,14 +42,21 @@ class PractitionerRoleToDoctorResource extends JsonResource
|
||||
'name_suffix' => $this->practitioner->person->name_suffix,
|
||||
'gender' => $this->practitioner->person->gender,
|
||||
// 'speciality_name' => !empty($this->speciality->name ?? null) ? 'Spesialis '. $this->speciality->name : 'Spesialis Empty',
|
||||
'is_online' => false,
|
||||
'is_insurance_covered' => rand(0,1) == 1,
|
||||
'is_online' => Route::getCurrentRoute()->action['as'] == 'doctors.online',
|
||||
'is_insurance_covered' => (rand(0,1) == 1),
|
||||
'price_range' => 'Rp 100.000 - Rp 350.000',
|
||||
'price_start' => '100000',
|
||||
'price_end' => '350000',
|
||||
'currency' => 'IDR',
|
||||
'avatar_url' => asset('images/default-doctor-avatar.png'),
|
||||
'hospital' => $organization,
|
||||
'speciality' => $speciality,
|
||||
'rating' => rand(350, 500) / 10,
|
||||
|
||||
'is_chat_available' => $this->is_chat_available,
|
||||
'is_video_available' => $this->is_video_available,
|
||||
'is_walkin_available' => $this->is_walkin_available,
|
||||
'is_instant_chat_available' => $this->is_instant_chat_available,
|
||||
];
|
||||
return parent::toArray($request);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user