I found validator unique syntax and used it my project. 'size_value'=>'required|unique:sizes,size_value,NULL,NULL,size_metric,'.$request->size_metric
I used it, it's working fine, it validate unique of size_metric+size_value in sizes table. But i just don't understand few usage of few parameters. sizes: table name size_value: 1st request value checked against field column (size_value) NULL: ???, NULL: ???, size_metric: 2nd column ,'.$request->size_metric: 2nd request value checked against 2nd column (size_metric)
Can somebody explain this validate unique syntax ? especially the 2 null Can i make unique validation for 3 columns ? i will have a validation for product_id + size + colour
Really appreciate your thoughts guys, thank you.