validate([ 'historyId' => 'required|integer' ]); $operations = MisSurgicalOperation::where('rf_MedicalHistoryID', $request->historyId)->get(); return response()->json( OperationsResource::collection($operations) ); } }