Level 102
https://laravel.com/docs/8.x/queries#updating-json-columns
->update(['columnname->toy->available' => false]);
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I want to update the available to false where toy->id=27. Can any give me the laravel eloquent query for this? Thanks.
{
"color":"red",
"toy":{
"id":27,
"name":"Truck",
"price":12,
"available":true
},
"quantity":"12"
}
Please or to participate in this conversation.