feat: add withdraw request functionality and UI components
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Client;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class InvoiceResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'number' => $this->number,
|
||||
'amount' => $this->amount,
|
||||
'status' => $this->status,
|
||||
'payment_method' => $this->payment_method,
|
||||
'paid_at' => $this->paid_at,
|
||||
'created_at' => $this->created_at,
|
||||
'document' => $this->whenLoaded('document', fn () => [
|
||||
'id' => $this->document->id,
|
||||
'code' => $this->document->code,
|
||||
'modality' => $this->document->modality,
|
||||
]),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user