I'm writing a Laravel 4 app that has a users
table with the usual contact info. In my users
model, my validation for the email specifies 'email'=>'required|email|unique:users',
which works fine when registering new users.
My question is how to handle the user edit form-- when the form is submitted, I'd like for the unique email constraint to only be fired if it's not the same as the old email-- otherwise you can't save your profile, since the email (your email) is already inuse.
Thanks
Auth::user()->id
since the user will be signed in to edit the record – Veneration