https://github.com/antonioribeiro/ia-collection
Laravel Illuminate Agnostic Collection
https://github.com/antonioribeiro/ia-collection
Last synced: 6 months ago
JSON representation
Laravel Illuminate Agnostic Collection
- Host: GitHub
- URL: https://github.com/antonioribeiro/ia-collection
- Owner: antonioribeiro
- License: mit
- Created: 2018-01-30T23:05:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-05T20:08:54.000Z (about 1 year ago)
- Last Synced: 2025-04-02T06:41:44.814Z (7 months ago)
- Language: PHP
- Size: 250 KB
- Stars: 48
- Watchers: 2
- Forks: 27
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# IlluminateAgnostic \ Collection
This package is an **unmodified** extraction of the [Laravel's Illuminate\Support\Collection](https://github.com/laravel/framework/blob/5.5/src/Illuminate/Support/Collection.php) class, including all helpers, repackaged to be agnostic and available to any PHP project.
It has its own namespace **(IlluminateAgnostic\Collection)**, so you can use it even on Laravel apps without risking a namespace conflict.
For docs, please check the Laravel documentation: https://laravel.com/docs/5.5/collections.
## Install
Via Composer
``` bash
$ composer require pragmarx/ia-collection
```## Usage
``` php
use IlluminateAgnostic\Collection\Support\Collection;return (new Collection([1, 2, 3, 4, 5]))->sum()
// or
return collect([1, 2, 3, 4, 5])->sum()
```## Change log
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Testing
``` bash
$ composer test
```## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details.
## Security
If you discover any security related issues, please email acr@antoniocarlosribeiro.com instead of using the issue tracker.
## Credits
- [Antonio Carlos Ribeiro](https://twitter.com/iantonioribeiro)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.