mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 05:53:58 +00:00
38 lines
1.6 KiB
PHP
38 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class BankStatementDetailResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'account_number' => $this->statementTransaction->statement->account->number,
|
|
'account_type' => $this->statementTransaction->statement->account->type,
|
|
'account_name' => $this->statementTransaction->statement->account->name,
|
|
'account_statement_id' => $this->statementTransaction->statement->id,
|
|
'account_statement_date_from' => $this->statementTransaction->statement->date_from,
|
|
'account_statement_date_to' => $this->statementTransaction->statement->date_to,
|
|
'date' => $this->date,
|
|
'description' => $this->description,
|
|
'amount' => $this->statementTransaction->amount,
|
|
'pay_for' => $this->pay_for,
|
|
'system_references' => $this->system_references,
|
|
'transaction_description_1' => $this->statementTransaction->transaction_description,
|
|
'transaction_description_2' => $this->statementTransaction->transaction_description_2,
|
|
'transaction_description_3' => $this->statementTransaction->transaction_description_3,
|
|
'transaction_description_4' => $this->statementTransaction->transaction_description_4,
|
|
'transaction_description_5' => $this->statementTransaction->transaction_description_5,
|
|
];
|
|
}
|
|
}
|