phpvms/app/Http/Resources/Fare.php
Nabeel S e22d6d5996
Refactoring Simbrief fares and aircraft (#1054)
* Refactoring simbrief fares and aircraft

* Hide user full name/email

* Sort PIREP fields desc; fix cargo counts

* Change the sorting

* Extra logs

* Fix tests

* Return fare information through the API

* Style fixes

* Test fix

* Another test fix

* More fixes

* Set aircraft and fares in prefile

* Formatting
2021-03-02 12:29:04 -05:00

28 lines
614 B
PHP

<?php
namespace App\Http\Resources;
use App\Contracts\Resource;
/**
* @mixin \App\Models\Fare
*/
class Fare extends Resource
{
public function toArray($request)
{
return [
'id' => $this->id,
'code' => $this->code,
'name' => $this->name,
'capacity' => $this->capacity,
'cost' => $this->cost,
'count' => $this->count ?? 0,
'price' => $this->price,
'type' => $this->type,
'notes' => $this->notes,
'active' => $this->active,
];
}
}