mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 20:44:25 +00:00
30 lines
845 B
PHP
30 lines
845 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class WalletTransactionResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'wallet_id' => (int) $this->wallet_id,
|
|
'bill_no' => (int) $this->bill_no,
|
|
'trans_type'=>(int) $this->trans_type,
|
|
'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
|
|
];
|
|
}
|
|
}
|