2017-12-13 06:58:27 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
|
|
|
|
use Illuminate\Http\Resources\Json\Resource;
|
|
|
|
|
|
|
|
class Subfleet extends Resource
|
|
|
|
{
|
|
|
|
public function toArray($request)
|
|
|
|
{
|
2019-07-16 03:14:40 +08:00
|
|
|
$res = parent::toArray($request);
|
|
|
|
$res['aircraft'] = Aircraft::collection($this->aircraft);
|
2017-12-13 06:58:27 +08:00
|
|
|
|
2019-07-16 03:14:40 +08:00
|
|
|
return $res;
|
2017-12-13 06:58:27 +08:00
|
|
|
}
|
|
|
|
}
|