make sure resources return the data object #186
This commit is contained in:
@@ -8,17 +8,9 @@ class Subfleet extends Resource
|
||||
{
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'airline_id' => $this->airline_id,
|
||||
'name' => $this->name,
|
||||
'type' => $this->type,
|
||||
'fuel_type' => $this->fuel_type,
|
||||
'cargo_capacity' => $this->cargo_capacity,
|
||||
'fuel_capacity' => $this->fuel_capacity,
|
||||
'gross_weight' => $this->gross_weight,
|
||||
$arr = parent::toArray($request);
|
||||
$arr['aircraft'] = Aircraft::collection($this->aircraft);
|
||||
|
||||
'aircraft' => Aircraft::collection($this->aircraft),
|
||||
];
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user