* SimBrief integration #405 * Add briefing as API response; add acars_xml field #405
This commit is contained in:
19
app/Http/Resources/SimBrief.php
Normal file
19
app/Http/Resources/SimBrief.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\Resource;
|
||||
|
||||
/**
|
||||
* @mixin \App\Models\SimBrief
|
||||
*/
|
||||
class SimBrief extends Resource
|
||||
{
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'url' => url(route('api.flights.briefing', ['id' => $this->id])),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user