Versions returned by Eloquent model are sorted by num field by MySQL. Unfortunately, MySQL does not provide natural sorting feature, and result is not always as expected (e.g. 2.9.5 > 2.10.1).
As it is not possible to automatically do a custom sorting when model data is fetched, I had to implement a sort function both on RSS response building and on Angular controller.
Versions returned by Eloquent model are sorted by
num
field by MySQL. Unfortunately, MySQL does not provide natural sorting feature, and result is not always as expected (e.g.2.9.5
>2.10.1
).As it is not possible to automatically do a custom sorting when model data is fetched, I had to implement a sort function both on RSS response building and on Angular controller.