i have a json array like :
users => json_encode(array[1,2,3,4]);
so i tried this query
SELECT * FROM user_conversations WHERE JSON_CONTAINS(users, JSON_ARRAY(1))
and it's works but i have no idea how to make this query in laravel and with Models.
EDIT 1 :
As i said :
DB::table('user_conversations')->whereRaw('JSON_CONTAINS(users, JSON_ARRAY(1))')->orderBy('created_at', 'desc')->paginate(5);
do the job.