Closed jpranskaitis closed 5 years ago
Will issue a fix as soon as possible
Thanks.
Also great idea would be to use protected $casts
for json operations.
Like:
class Menu extends CmsModel {
//...
protected $casts = [
'order' => 'array'
]
//...
}
Laravel would parse the field for you and you will not need to encode/decode it anywhere.
One drawback is that you will not be able to do ->update(['order' => $order_array)
directly, but
$menu->order = $order_array;
$menu->save();
would work like a charm.
Will look at making those adjustments, thanks
To repeat this issue just create 'main' menu add two links to it, change the sorting of them, delete one link and open a page that shows 'main' menu.