diff --git a/app/Http/Controllers/Frontend/PirepController.php b/app/Http/Controllers/Frontend/PirepController.php index d7cabd98..de3d9243 100644 --- a/app/Http/Controllers/Frontend/PirepController.php +++ b/app/Http/Controllers/Frontend/PirepController.php @@ -181,8 +181,9 @@ class PirepController extends Controller $where = [['user_id', $user->id]]; $where[] = ['state', '<>', PirepState::CANCELLED]; + $with = ['airline', 'aircraft', 'dpt_airport', 'arr_airport', 'fares', 'comments']; - $this->pirepRepo->with(['airline', 'aircraft', 'dpt_airport', 'arr_airport']) + $this->pirepRepo->with($with) ->pushCriteria(new WhereCriteria($request, $where)); $pireps = $this->pirepRepo->orderBy('created_at', 'desc')->paginate();