1use Illuminate\Validation\Rule;
2
3public function rules()
4{
5 return [
6 'title' => [
7 'required',
8 Rule::unique('posts', 'title')->ignore($this->post)
9 ]
10 ];
11}
12
1public function rules()
2{
3 return [
4 'email' => 'required|email|unique:users,email,'.$this->user->id,
5 ];
6}
7