|
|
@@ -19,18 +19,16 @@ public function toArray(Request $request): array
|
|
|
{
|
|
|
return [
|
|
|
'id' => $this->id,
|
|
|
+ 'unit_id' => $this->unit_id,
|
|
|
'name' => $this->name,
|
|
|
+ 'treasury_type' => $this->treasury_type,
|
|
|
+ 'bank_name' => $this->bank_name,
|
|
|
+ 'bank_agency' => $this->bank_agency,
|
|
|
+ 'bank_account' => $this->bank_account,
|
|
|
+ 'bank_type_account' => $this->bank_type_account,
|
|
|
+ 'active' => (bool) $this->active,
|
|
|
'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')),
|
|
|
];
|
|
|
}
|
|
|
|