У меня есть столбец json, и каждый раз, когда я хочу вставить новый, я хочу проверить, является ли он дублированным или нет. Но я не получаю никакого ответа, даже если он повторяется.
$question->original_free_text = json_encode($paragraph); //that's how I save it (and works)
//here I want to check if is duplicated.
$check = Question::where('original_free_text', '=', $question->original_free_text);
dd($check); //is null, even if are the same data
//Response
[
{
"content": {
"content": "<p><span style=\"font-size:9pt;\"><strong>"Affiliate"</strong></span> <span style=\"font-size:9pt;\">means, with respect to a party, any entity, which directly or indirectly Controls, is</span> <span style=\"font-size:9pt;\">Controlled</span> <span style=\"font-size:9pt;\">by, or is under common Control with such party.</span></p>",
"numbering": "1.1"
},
"children": []
},
{
"content": {
"content": "<p><span style=\"font-size:9pt;\"><strong>"{P1_Pros}"</strong></span> <span style=\"font-size:9pt;\">means the Cloud Service, and/or Software licensed and/or purchased by Customer under the Agreement</span></p>",
"numbering": "1.2"
},
"children": []
},
{
"content": {
"content": "<p><span style=\"font-size:9pt;\"><strong>“Cloud</strong></span> <span style=\"font-size:9pt;\">means the cloud service offerings as further described in the Documentation</span> <span style=\"font-size:9pt;\">and</span> <span style=\"font-size:9pt;\">on the Order Form.</span></p>",
"numbering": "1.3"
},
"children": []
}
]