Same Email/Username update validation rule in Laravel
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.
$request->validate([
'email' => ['required','string','unique:users,email,'.$user_id],
'username' => ['required','string','unique:users,username,'.$user_id],