laravel - Change default column name 'id' when validating -


i trying validate email field make sure it's unique, not in row id, so:

'email' => 'required|email|unique:seller_user,email,'.$seller_id, 

that works, automatically searches column named id, whereas in table column called seller_id, how can change that?

you can specify field search using fourth parameter rule:

'email' => 'required|email|unique:seller_user,email,'.$seller_id.',seller_id', 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -