Просмотр исходного кода

feat(chart-of-accounts): expose plan account fields in resource

ebagabee 1 месяц назад
Родитель
Сommit
a0fb2f6175
1 измененных файлов с 5 добавлено и 10 удалено
  1. 5 10
      app/Http/Resources/FinancialPlanAccountResource.php

+ 5 - 10
app/Http/Resources/FinancialPlanAccountResource.php

@@ -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')),
         ];
     }