mercredi 11 mars 2020

Laravel Unique Depends on Other Column

I have a table school_name and in form i want to apply 2 conditions if school name exist than branch must be unique

I tried below validation but its not working

 'name' => 'required',
 'branch' => 'required:unique:school_name,name',


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire