|
|
@@ -19,18 +19,13 @@ public function toArray(Request $request): array
|
|
|
{
|
|
|
return [
|
|
|
'id' => $this->id,
|
|
|
- 'name' => $this->name,
|
|
|
+ 'unit_id' => $this->unit_id,
|
|
|
+ 'code' => $this->code,
|
|
|
+ 'order' => $this->order,
|
|
|
+ 'description' => $this->description,
|
|
|
+ 'chart_type' => $this->chart_type,
|
|
|
'created_at' => Carbon::parse($this->created_at)->format('Y-m-d H:i:s'),
|
|
|
'updated_at' => Carbon::parse($this->updated_at)->format('Y-m-d H:i:s'),
|
|
|
- // Add your fields here
|
|
|
-
|
|
|
- // Conditional fields
|
|
|
- // $this->mergeWhen($request->user()?->isAdmin(), [
|
|
|
- // 'internal_notes' => $this->internal_notes,
|
|
|
- // ]),
|
|
|
-
|
|
|
- // Relationships
|
|
|
- // 'user' => new UserResource($this->whenLoaded('user')),
|
|
|
];
|
|
|
}
|
|
|
|