I have some code written like this:
foreach ($models as $model) { Redis::hset(\'model_App\\ServiceModel\', $model[$primaryKey], json_encode($model->toArra
Redis' Hashes are unordered - that is the expected behavior. If sorting is needed, either look into using Sorted Sets, the SORT command, or (preferably) sorting the data in the client.