$this->id, 'pilot_id' => $this->pilot_id, 'ident' => $this->ident, 'name' => $this->name, 'email' => $this->email, 'avatar' => $this->resolveAvatarUrl(), 'rank_id' => $this->rank_id, 'home_airport' => $this->home_airport_id, 'curr_airport' => $this->curr_airport_id, 'last_pirep_id' => $this->last_pirep_id, 'flights' => $this->flights, 'flight_time' => $this->flight_time, 'timezone' => $this->timezone, 'state' => $this->state, ]; $res['airline'] = Airline::make($this->whenLoaded('airline')); $res['bids'] = UserBid::collection($this->whenLoaded('bids')); $res['rank'] = Rank::make($this->whenLoaded('rank')); return $res; } }