Giant Update
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Payment;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class PaymentTransactionResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id, 'uuid' => $this->uuid, 'transaction_number' => $this->transaction_number,
|
||||
'tenant' => $this->whenLoaded('tenant'), 'user' => $this->whenLoaded('user'),
|
||||
'customer' => $this->whenLoaded('customer'), 'invoice' => $this->whenLoaded('invoice'),
|
||||
'provider' => $this->account?->provider, 'gateway_scope' => $this->gateway_scope,
|
||||
'purpose' => $this->purpose, 'method' => $this->method, 'amount' => $this->amount,
|
||||
'provider_fee' => $this->provider_fee, 'platform_fee' => $this->platform_fee,
|
||||
'total_amount' => $this->total_amount, 'currency' => $this->currency, 'status' => $this->status,
|
||||
'provider_status' => $this->provider_status, 'provider_reference' => $this->provider_reference,
|
||||
'expires_at' => $this->expires_at, 'paid_at' => $this->paid_at, 'created_at' => $this->created_at,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user