Files
exchange-2.0/app/Http/Resources/ReceiptResource.php
T
weiken.intex 4d8079c7a5 Receipt
2020-12-10 15:08:02 +08:00

35 lines
1.0 KiB
PHP

<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class ReceiptResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'trans_type1' => $this->trans_type1,
'trans_type2' => $this->trans_type2,
'bill_no' => (int) $this->bill_no,
'amount' => (double) $this->amount,
'currency_id' => (int) $this->currency_id,
'original_amount' => (double) $this->original_amount,
'original_currency_id' => (int) $this->original_currency_id,
'currency_rate' => (double) $this->currency_rate,
'dt_transaction' => $this->dt_transaction,
'status' => (int) $this->status,
'booking_id' => (int) $this->booking_id,
'company_id' => (int) $this->company_id
];
}
}