PHPackages                             goksagun/collection - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. goksagun/collection

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

goksagun/collection
===================

A PHP collection library providing functionalities for managing and manipulating collections.

v0.2.8(7mo ago)0130MITPHPPHP ^8.2

Since Apr 22Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/goksagun/collection)[ Packagist](https://packagist.org/packages/goksagun/collection)[ RSS](/packages/goksagun-collection/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (11)Used By (0)

Collection
==========

[](#collection)

A PHP collection library providing functionalities for managing and manipulating product collections.

Features
--------

[](#features)

- Create a collection of items
- Add a item to the collection
- Map over the collection to apply a function to each item
- Filter the collection based on a predicate
- Pluck a specific property from each item in the collection
- Reduce the collection to a single value
- Sort the collection based on a custom comparison function

Installation
------------

[](#installation)

Use [Composer](https://getcomposer.org/) to install this library:

```
composer require goksagun/collection
```

Usage
-----

[](#usage)

Here's a basic example of how to use this library:

```
