Level 48
I'm not sure the ->> operator is supported by eloquent. You might have to use DB::raw for that part.
DB::table('table')->where('Content->cycle_id', 1)
OR
DB::table('table')->whereRaw("Content->>'$.cycle_id' = 1")
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a mysql query
$sql="SELECT *from table where `Content`->>'$.cycle_id'=1";
How can i convert this query to laravel?Any help would be appreciated.
Please or to participate in this conversation.