Preload fares with PIREP
This commit is contained in:
parent
bf878a98a4
commit
3b6800077f
@ -181,8 +181,9 @@ class PirepController extends Controller
|
|||||||
|
|
||||||
$where = [['user_id', $user->id]];
|
$where = [['user_id', $user->id]];
|
||||||
$where[] = ['state', '<>', PirepState::CANCELLED];
|
$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));
|
->pushCriteria(new WhereCriteria($request, $where));
|
||||||
$pireps = $this->pirepRepo->orderBy('created_at', 'desc')->paginate();
|
$pireps = $this->pirepRepo->orderBy('created_at', 'desc')->paginate();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user