buckets/app/Http/Resources/OutflowResource.php

24 lines
647 B
PHP
Raw Normal View History

2025-12-31 02:34:30 +01:00
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class OutflowResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'id' => $this->uuid,
'stream_id' => $this->stream?->uuid,
'bucket_id' => $this->bucket?->uuid,
2025-12-31 02:34:30 +01:00
'amount' => $this->amount_currency,
'formatted_amount' => $this->formatted_amount,
'date' => $this->date->format('Y-m-d'),
'description' => $this->description,
'is_projected' => $this->is_projected,
];
}
}