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