mammut-alex / laravel-collection-thanos
A set of thanos Laravel collection macros
v1.1.1
2019-08-06 09:17 UTC
Requires
- php: >=7.1
- laravel/framework: >=5.8
Requires (Dev)
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-11-06 22:16:49 UTC
README
Installation
Require this package in your composer.json
and update composer.
"mammut-alex/laravel-collection-thanos": "^1.0"
or composer require mammut-alex/laravel-collection-thanos
Introduction
Thanos is disaster some of you collection.
Here is an example
$data = new Collection([1, 2, 3, 4, 5, 6, 7, 8, 9,10]); $data->thanos()->all();//[2,4,5,8,10]
Also you can choose the degree of kindness of the Thanos (what percentage of creature he items to have mercy)
$data = new Collection([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); $data->thanos(20)->all();//[2,5]
License
Laravel Collection Thanos is open-sourced software licensed under the MIT license.