| Path : /var/www/html/moneyexchange/app/Http/Resources/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : //var/www/html/moneyexchange/app/Http/Resources/ExchangeRateResource.php |
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class ExchangeRateResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
$datas = [];
return [
'money_exchange_list_id' =>$this->id,
'exchange_from_id'=> $this->exchange_from_currency_id,
'exchange_from_name'=> $this->exchangeFromCurrency->name??'',
'exchange_from_code'=> $this->exchangeFromCurrency->currency_code??'',
'exchange_to_id'=> $this->exchange_to_currency_id,
'exchange_to_name'=> $this->exchangeToCurrency->name??'',
'exchange_to_code'=> $this->exchangeToCurrency->currency_code??'',
'calculation'=> $this->calculation,
'current_rate'=> $this->current_rate,
'updated_at'=> $this->last_updated_rate,
'is_active'=> $this->is_active?True:False
];
}
}