mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
26 lines
592 B
PHP
26 lines
592 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class VoucherRedemptionResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'voucher_id' => $this->voucher_id,
|
|
'transaction_id' => $this->transaction_id,
|
|
'redemption_id' => $this->redemption_id,
|
|
'value' => (float) $this->value
|
|
];
|
|
}
|
|
}
|