25 lines
556 B
PHP
Executable File
25 lines
556 B
PHP
Executable File
<?php
|
|
|
|
namespace Modules\Linksehat\Transformers\Speciality;
|
|
|
|
use App\Helpers\Helper;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class SpecialityForHospitalDetailResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'name' => 'Spesialis ' . $this->name,
|
|
'avatar' => url('images/default-hospital-image.png'),
|
|
];
|
|
}
|
|
}
|