mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 13:01:06 +03:30
fix some problems
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user