dimanche 6 mars 2022

i want to make validation for two unique col with laravel

i have two colums type_id , size_id in table i want to make validation role to prevent user enter the same record

example this is database ( type_size_db)

type_id size_id
type123 sm
type456 bg

if user enter this value (type123 , sm ) the validation will display this values was enterd but if user enter this value (type123 , bg) ,,,, >> will enterd successfully

in databas i make the two value unique $table->unique(['type_id', 'size_id']);

but the role of valdation not working will with me ! i need help

i am using laravel 5.8



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire