Make sure user and acars data is sent from API

This commit is contained in:
Nabeel Shahzad
2020-03-29 13:33:14 -04:00
parent 82b873c071
commit e9b30fbe30
8 changed files with 46 additions and 24 deletions

View File

@@ -162,13 +162,17 @@ class PirepController extends Controller
}
/**
* @param $pirep_id
* @param string $id The PIREP ID
*
* @return PirepResource
*/
public function get($pirep_id)
public function get($id)
{
return new PirepResource($this->pirepRepo->find($pirep_id));
$pirep = $this->pirepRepo
->with(['acars', 'arr_airport', 'dpt_airport', 'comments', 'flight', 'simbrief', 'user'])
->find($id);
return new PirepResource($pirep);
}
/**

View File

@@ -90,7 +90,7 @@ class UserController extends Controller
public function get($id)
{
$user = $this->userRepo
->with(['airline', 'rank'])
->with(['airline', 'bids', 'rank'])
->find($id);
return new UserResource($user);