large commit

This commit is contained in:
omair saleh
2021-03-11 13:06:02 +08:00
parent 13ddf458db
commit 05401f6bbc
729 changed files with 23312 additions and 7218 deletions
+10 -9
View File
@@ -2,6 +2,7 @@
namespace App\Http\Resources;
use Carbon\Carbon;
use Illuminate\Http\Resources\Json\JsonResource;
class TransactionResource extends JsonResource
@@ -14,21 +15,21 @@ class TransactionResource extends JsonResource
*/
public function toArray($request)
{
return [
'id' => $this->id,
'trans_type1' => $this->trans_type1,
'trans_type2' => $this->trans_type2,
'bill_no' => (int) $this->bill_no,
'booking' => new BookingResource($this->booking),
'bill_no' => $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' => new CurrencyResource($this->currency),
'original_currency' => new CurrencyResource($this->original_currency),
'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
'details' => TransactionDetailResource::collection($this->transactionDetails),
'documents' => new DocumentResource($this->documents()->first()),
'expires_on' => Carbon::parse($this->expires_on)->format('d-m-Y h:s:i'),
'updated_at' => Carbon::parse($this->update_at)->format('d-m-Y h:s:i')
];
}
}