mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 00:41:07 +03:30
30 lines
737 B
PHP
30 lines
737 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Services\Media\Resources\MediaResource;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class MedicalCenterResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray( $request )
|
|
{
|
|
return [
|
|
'id' => $this->id ,
|
|
'name' => $this->name ,
|
|
'address' => $this->address ,
|
|
'phone_number' => $this->phone_number ,
|
|
'city' => $this->when( $this->city , $this->city ),
|
|
'created_at' => $this->created_at,
|
|
'updated_at' => $this->updated_at
|
|
];
|
|
}
|
|
}
|