In your case while updating the post you can ignore the current post
id you are updating by specifying that id in the unique
rule
$request->validate([
'title' => 'required|unique:posts,title,'.$post->id.'|max:255',
'content' => 'required',
]);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…