Return full PIREP when updating
This commit is contained in:
parent
6f05dd6c86
commit
e8037c7d69
@ -212,7 +212,7 @@ class PirepController extends Controller
|
|||||||
|
|
||||||
event(new PirepPrefiled($pirep));
|
event(new PirepPrefiled($pirep));
|
||||||
|
|
||||||
return new PirepResource($pirep);
|
return $this->get($pirep->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -258,7 +258,7 @@ class PirepController extends Controller
|
|||||||
|
|
||||||
event(new PirepUpdated($pirep));
|
event(new PirepUpdated($pirep));
|
||||||
|
|
||||||
return new PirepResource($pirep);
|
return $this->get($pirep->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -321,7 +321,7 @@ class PirepController extends Controller
|
|||||||
|
|
||||||
$this->pirepSvc->submit($pirep);
|
$this->pirepSvc->submit($pirep);
|
||||||
|
|
||||||
return new PirepResource($pirep);
|
return $this->get($pirep->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -461,7 +461,7 @@ class PirepController extends Controller
|
|||||||
{
|
{
|
||||||
$pirep = Pirep::find($id);
|
$pirep = Pirep::find($id);
|
||||||
|
|
||||||
return AcarsRouteResource::collection(Acars::where([
|
return AcarsRouteResource::collection(Acars::with('pirep')->where([
|
||||||
'pirep_id' => $id,
|
'pirep_id' => $id,
|
||||||
'type' => AcarsType::ROUTE,
|
'type' => AcarsType::ROUTE,
|
||||||
])->orderBy('order', 'asc')->get());
|
])->orderBy('order', 'asc')->get());
|
||||||
|
Loading…
Reference in New Issue
Block a user