Package pckg/collectionarrow-up-right provides a ways handle collection of items / arrays and strings easily.
pckg/collection
For standalone usage simply require pckg/collection with Composer.
$ composer require pckg/collection
Collect array or object with collect() function or instantiate new Collection object.
collect()
Collection
$collection = collect([]);
See more examples in pckg/collectionarrow-up-right repository at GitHub.
Last updated 2 years ago