Forum Laravel Model Save or Update Casts Object
I have an element casts to object:
//Inside a Model file:
protected $casts = [ 'value' => 'object', ];
Ok now if I update it like this way it won't work:
$something = Something::first(); $something->value->any = 'any'; $something->save();
BTW I'm using laravel 5.5
Please sign in or create an account to participate in this conversation.
There's no shortage of content at Laracasts. In fact, you could watch nonstop for days upon days, and still not see everything!
Get Started
Model Save or Update Casts Object
I have an element casts to object:
//Inside a Model file:
Ok now if I update it like this way it won't work:
BTW I'm using laravel 5.5