This question already has an answer here:
- Laravel: Validation unique on update 16 answers
I have a user admin panel where admin can create update users and while users have a unique email field. While updating when I don't wanna change the email address it should be as it is. but throwing me error like: The email has already been taken.
I already tried:
and my user model rule
'email' => 'required|unique:users,email,{$user->id}'
what I'm missing here? please help
</div>