Skip to main content

Command Palette

Search for a command to run...

Same Email/Username update validation rule in Laravel

Published
1 min read
S

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],
16 views