The National Archives.See: https://www.nationalarchives.gov.uk/help-with-your-research/research-guides/british-army-war-diaries-1914-1922/
He's on Our Roll of Honour website https://www.liverpoolpals.com/soldier/?i=1394/58602-Pte-lawrence-michael-kavanagh
Are you looking for Private Laurence Michael Kavanagh?As KGarrad says, the war diaries are available at the National Archives and can be downloaded after registering (it's free). The link is: https://discovery.nationalarchives.gov.uk/details/r/C7353647. You need the second pdf, and the events of 31 July 1917 are at pages 20-22. Apart from the officers the only other rank killed to be named was the Signals Sergeant James Douglas Rigby. 35 Other Ranks died that day.The diaries will also be on Ancestry.