SimBrief integration #405 (#635)

* SimBrief integration #405

* Add briefing as API response; add acars_xml field #405
This commit is contained in:
Nabeel S
2020-03-23 09:31:35 -04:00
committed by GitHub
parent 04b9e37e1d
commit 9e5386264f
70 changed files with 6816 additions and 192 deletions

View File

@@ -2,11 +2,16 @@
namespace App\Http\Resources;
use App\Contracts\Resource;
use App\Http\Resources\SimBrief as SimbriefResource;
use App\Models\Enums\PirepStatus;
use App\Support\Units\Distance;
use App\Support\Units\Fuel;
class Pirep extends Response
/**
* @mixin \App\Models\Pirep
*/
class Pirep extends Resource
{
/**
* Transform the resource into an array.
@@ -75,6 +80,9 @@ class Pirep extends Response
// format to kvp
$res['fields'] = new PirepFieldCollection($this->fields);
// Simbrief info
$res['simbrief'] = new SimbriefResource($this->whenLoaded('simbrief'));
return $res;
}
}