Add more API resources; user bid management and tests #35 #36

This commit is contained in:
Nabeel Shahzad
2017-12-12 16:58:27 -06:00
parent 5b25a464ba
commit 248a8d1488
27 changed files with 470 additions and 166 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\Resource;
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,
'aircraft' => Aircraft::collection($this->aircraft),
];
}
}