mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
30 lines
715 B
PHP
30 lines
715 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class ReceiptDetailResource 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,
|
|
'transaction_id' => (int) $this->transaction_id,
|
|
'receipt_id' => (int)$this->receipt_id,
|
|
'price' => (double) $this->price,
|
|
'amount' => (double) $this->amount
|
|
|
|
];
|
|
}
|
|
}
|