lundi 29 mai 2017

Laravel how to check validate unique table two field

I have tableA that there are 2 field

1. song_id
2. playlist_id

I want to check laravel validate unique func example: I have inserted data

id =>  1
song_id => 2
playlist_id => 34

then I have to insert data again I want to check that if playlist_id => 34 already inserted song_id = 2 show message "already insert" but if playlist_id => 34 insert song_id = 3 allow insert

thank you for your help!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire