public function getMoveInfo($id) { $truck = Truck::with('moves')->findOrFail($id); $moves = $truck->moves; foreach ($moves as $move) { $crew = Crew::with('movers')->findOrFail($move->crew_id); $move->crew = $crew; } return response()->json($moves); }