我想检查mysql列中存在的数据是否已经存在显示错误消息而不存在插入输入数据与laravel 5.2 Validator存在(数据库)
有我的代码。
for (var j=2; j<22; j++){
for(var i=1; i<j; i++){
arrayPlay.push(arrayRandomColors[i-1]);
}
//console.log(arrayPlay);
for (var k=0; k<arrayPlay.length; k++){
var id = setInterval(function(){
console.log("entrou");
if (arrayPlay[k] == 1){
$red.css("background-color", "#ffc1c1");
$red.delay(500);
$red.css("background-color", "red");
}
else if (arrayPlay[k] == 2){
$blue.css("background-color", "#a5b0f7");
$blue.delay(500);
$blue.css("background-color", "blue");
}
else if (arrayPlay[k] == 3){
$green.css("background-color", "#aff7a5");
$green.delay(500)
$green.css("background-color", "green");
}
else if (arrayPlay[k] == 4){
$yellow.css("background-color", "#fffb91");
$yellow.delay(500);
$yellow.css("background-color", "yellow");
}
}, 500);
}
arrayPlay = [];
console.log("\n");
}
谢谢! :d