cviebrock / eloquent-taggable

Easily add the ability to tag your Eloquent models in Laravel.
MIT License
537 stars 72 forks source link

call values() on the sorted array to reset the keys #146

Closed y1n0 closed 3 months ago

y1n0 commented 3 months ago

without calling values, the returned array format in not consistent: sometimes a numbered array if returned (if sort happened to not change the order) or an assoc array (in case sort did actually move items around and kept their index).

Screenshot 2024-06-06 at 14 28 31

Thank you for helping to make this package better!

Please make sure you've read CONTRIBUTING.md before submitting your pull request, and that you have:

Thank you!

cviebrock commented 3 months ago

Thanks ... good catch!