Update response objects

This commit is contained in:
Nabeel Shahzad
2020-03-31 17:26:55 -04:00
parent 819d3bcb47
commit d1d243ef06
4 changed files with 19 additions and 12 deletions

View File

@@ -67,8 +67,8 @@ class Pirep extends Resource
$res['dpt_airport'] = new Airport($this->dpt_airport);
$res['arr_airport'] = new Airport($this->arr_airport);
$res['position'] = new Acars($this->position);
$res['comments'] = PirepComment::collection($this->comments);
$res['position'] = Acars::make($this->whenLoaded('position'));
$res['comments'] = PirepComment::make($this->whenLoaded('comments'));
$res['user'] = [
'id' => $this->user->id,
'name' => $this->user->name,