dimanche 30 avril 2017

unique between 2 columns

i need to create a validation to my table "candidate_knowledges", basically in this table it accepts to columns (candidate_id, software_id), i cannot let create user_id and software more then one. but i think my validation is wrong or im not doing it right. What im trying to say in validation is that can only exist one software_id and one candidate_id on the table, this way the candidate dont have duplicate entries.

Ex:  'software_id'         => 'required|integer|unique:candidate_knowledges,candidate_id,'.$candidate->id,



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2qsIF4C
via IFTTT

Aucun commentaire:

Enregistrer un commentaire