Same Email/Username update validation rule in Laravel
$request->validate([
'email' => ['required','string','unique:users,email,'.$user_id],
'username' => ['required','string','unique:users,username,'.$user_id],
About the author
I am CS Student currently perusing my bachelor degree. I love coding and implementing new logics. Aside from that I'm also a hardware lover and has great interest in IOT.
Comments
Join the discussionNo comments yet. Be the first to comment.