Hacker News new | past | comments | ask | show | jobs | submit login

Laravel has Collection class that wraps arrays - as such you can do `(new Collection([your array]))->filter(function(){})` or `(new Collection([your array]))->map(function(){})`. It also adds other helper methods. I guess Symfony has something similar

Reference: https://laravel.com/docs/5.8/collections




Or collect([your array]). I love Laravel collections.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: