Added supporting Resources and Helpers
This commit is contained in:
parent
b62fa7757c
commit
ab89fada83
10
app/Facades/RestHelper.php
Normal file
10
app/Facades/RestHelper.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Facades;
|
||||||
|
|
||||||
|
use \Illuminate\Support\Facades\Facade;
|
||||||
|
|
||||||
|
class RestHelper extends Facade
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
25
app/Http/Resources/AcarsLog.php
Normal file
25
app/Http/Resources/AcarsLog.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Resources;
|
||||||
|
|
||||||
|
use Illuminate\Http\Resources\Json\Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ACARS table but only include the fields for the routes
|
||||||
|
* Class AcarsRoute
|
||||||
|
* @package App\Http\Resources
|
||||||
|
*/
|
||||||
|
class AcarsLog extends Resource
|
||||||
|
{
|
||||||
|
public function toArray($request)
|
||||||
|
{
|
||||||
|
return parent::toArray($request);
|
||||||
|
/*return [
|
||||||
|
'id' => $this->id,
|
||||||
|
'name' => $this->name,
|
||||||
|
'log' => $this->log,
|
||||||
|
'lat' => $this->lat,
|
||||||
|
'lon' => $this->lon,
|
||||||
|
];*/
|
||||||
|
}
|
||||||
|
}
|
26
app/Http/Resources/AcarsRoute.php
Normal file
26
app/Http/Resources/AcarsRoute.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Resources;
|
||||||
|
|
||||||
|
use Illuminate\Http\Resources\Json\Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ACARS table but only include the fields for the routes
|
||||||
|
* Class AcarsRoute
|
||||||
|
* @package App\Http\Resources
|
||||||
|
*/
|
||||||
|
class AcarsRoute extends Resource
|
||||||
|
{
|
||||||
|
public function toArray($request)
|
||||||
|
{
|
||||||
|
return parent::toArray($request);
|
||||||
|
/*return [
|
||||||
|
'id' => $this->id,
|
||||||
|
'name' => $this->name,
|
||||||
|
'order' => $this->order,
|
||||||
|
'nav_type' => $this->nav_type,
|
||||||
|
'lat' => $this->lat,
|
||||||
|
'lon' => $this->lon,
|
||||||
|
];*/
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user