In my code I have an Eloquent model which has one JSON-column steps, which is casted as array:
protected $casts = [
'steps' => 'array',
];
But if I know update the column with an array like this:
$model->update([
'steps' => [
'connect' => 'A', 'clone' => 'A'
]
]);
Anything internally changes the order of json-array which is stored to the database, which looks like this now:
Any ideas how to prevent Eloquent from changing the order of the array items while storing them?
Little Update: The array is always sorted alphabetically by the keys before stored.
