Your data looks binary to me. when I export my JSON it looks like JSON.
I think you want to cast content to json, and not an array, won't matter for this though.
Is your DB column also JSON?
Table :: orders Json column : content
protected $casts = [
'content' => 'array',
];
example data in (content) Json column :
{"text-1606864316283":"\u062d\u0628\u064a\u0628 \u062d\u0645\u062f","text-1606864319865":"\u0627\u0644\u0645\u0627\u0646\u064a\u0629","number-1606864754766":"017655776017","textarea-1606864812668":"\u0644\u0627","textarea-1667933372850":"\u0644\u0627\u064a\u0648\u062c\u062f","textarea-1667933643727":"\u0644\u0627\u064a\u0648\u062c\u062f","textarea-1667933660719":"\u0644\u0627\u064a\u0648\u062c\u062f","textarea-1667933444030":"\u0644\u0627\u064a\u0648\u062c\u062f","text-1667932207314":"\u0631\u062c\u0627\u0621 \u0645\u0644\u0627 \u062d\u0645\u0648\u062f","text-1606864693803":"\u0633\u0648\u0631\u064a\u0627","text-1667932291997":"\u0627\u0644\u062d\u0633\u0643\u0629: \u0642\u0631\u064a\u0629 \u0627\u0644\u062a\u0648\u064a\u0646\u0629","number-1606864776968":"0985714363","textarea-1667932570890":"\u0644\u0627 \u064a\u0648\u062c\u062f","radio-group-1606864610564":"\u062f\u0627\u0626\u0645\u0629","radio-group-1661790430458":"\u0639\u0642\u062f \u0632\u0648\u0627\u062c \u0645\u0639 \u0644\u0645 \u0634\u0645\u0644","radio-group-1667932356304":"\u0646\u0639\u0645 \u0623\u0648\u0627\u0641\u0642"}
Here the data is stored from a dynamic form not static
So I stored it as json
Now when you try to search for some of the words that have been entered, the results do not appear
Knowing that the word exists, but it was converted to the following form when stored
I tried the following methods and did not find any result
Order::where('content', 'LIKE', "%" . str_replace('"', '', json_encode(request()->search)) . "%")->get(); // no result
Order::where('content', 'LIKE', "%" . request()->search . "%")->get(); // no result
Order::where('content', 'LIKE', "%". json_encode(request()->search) . "%")->get(); // no result
Order::whereJsonContains('content', json_encode(request()->search))->get(); // no result
Is there a way whatsoever for me to be able to search within this column in multiple languages
Is there any way I can search inside this column ?
Please or to participate in this conversation.