Files
exchange-2.0/app/Http/Resources/WalletTransactionResource.php
T
2020-12-07 13:59:10 +08:00

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
];
}
}