I would like to create a validation for the update function I would like it to exclude the title for that dedant id
public function update(Request $request, Post $post)
{
$this->validate($request,[
'title' => "required|unique:posts,title,".$id.'id',
'image' => 'image',
'categories' => 'required',
//'tags' => 'required',
'body' => 'required',
]);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire