mammut-alex/laravel-collection-thanos

A set of thanos Laravel collection macros

v1.1.1 2019-08-06 09:17 UTC

This package is auto-updated.

Last update: 2024-05-06 21:11:58 UTC


README

62409693-d8bd5080-b5e3-11e9-917c-62fadc44652a.png

Build Status Code Climate StyleCI

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.