3 ms·
Laravel’s “Collections” library [1] solves this, and is a breath of fresh air. Easily one of the best features of the framework (though you can also use it as a
by jw1224 4y ago
Laravel’s “Collections” library [1] solves this, and is a breath of fresh air. Easily one of the best features of the framework (though you can also use it as a separate package, outside of a Laravel app [2]).
It’s simple to use, but extremely powerful. I pretty much always use Collections over native array functions these days.
[1] https://laravel.com/docs/9.x/collections https://laravel.com/docs/9.x/collections
[2] https://github.com/illuminate/collections https://github.com/illuminate/collections
- user3939382 4y agoDoctrine Collections similarly solves this.