PHPackages                             chrgriffin/collection-macro-thanos - 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. chrgriffin/collection-macro-thanos

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

chrgriffin/collection-macro-thanos
==================================

Laravel Collection macro: randomly delete half of the items in a Collection.

v1.0.0(6y ago)11MITPHPPHP ^7.1.3CI failing

Since Feb 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ChrGriffin/collection-macro-thanos)[ Packagist](https://packagist.org/packages/chrgriffin/collection-macro-thanos)[ RSS](/packages/chrgriffin-collection-macro-thanos/feed)WikiDiscussions master Synced today

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

[![Build Status](https://camo.githubusercontent.com/1780bf39c959c3ec1d1983dc7e9078792cb6a8213ce354c42877aeb986f76a74/68747470733a2f2f6170702e636f6465736869702e636f6d2f70726f6a656374732f64363132663564302d336339642d303133382d386563622d3736383432396561353466362f7374617475733f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/1780bf39c959c3ec1d1983dc7e9078792cb6a8213ce354c42877aeb986f76a74/68747470733a2f2f6170702e636f6465736869702e636f6d2f70726f6a656374732f64363132663564302d336339642d303133382d386563622d3736383432396561353466362f7374617475733f6272616e63683d6d6173746572)[![Coverage Status](https://camo.githubusercontent.com/6e410bc7cb3c73c1d20da04d491ba4e53506c48359186db3ecad36513ba67201/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4368724772696666696e2f636f6c6c656374696f6e2d6d6163726f2d7468616e6f732f62616467652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/6e410bc7cb3c73c1d20da04d491ba4e53506c48359186db3ecad36513ba67201/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4368724772696666696e2f636f6c6c656374696f6e2d6d6163726f2d7468616e6f732f62616467652e7376673f6272616e63683d6d6173746572)

Laravel Collection Macro: Thanos
================================

[](#laravel-collection-macro-thanos)

This macro for Laravel Collections will randomly delete half the items in a collection.

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

[](#installation)

Install in your Laravel project via composer:

```
composer install chrgriffin/collection-macro-thanos
```

If your version of Laravel supports auto-discovery (versions 5.5 and up), that's it!

For older versions of Laravel, you will need to edit your `config/app.php` file to include the service provider in your providers array:

```
return [
    // ...
    'providers' => [
        // ...
        CollectionMacroThanos\ServiceProvider::class
    ]
];
```

Usage
-----

[](#usage)

You should now be able to chain `->thanos()` onto any collections to randomly delete half the items in the collection.

```
$collection = collect([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
    ->thanos(); // 1, 3, 4, 6, 8
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2316d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10466686?v=4)[Christian](/maintainers/ChrGriffin)[@ChrGriffin](https://github.com/ChrGriffin)

---

Top Contributors

[![ChrGriffin](https://avatars.githubusercontent.com/u/10466686?v=4)](https://github.com/ChrGriffin "ChrGriffin (15 commits)")

### Embed Badge

![Health badge](/badges/chrgriffin-collection-macro-thanos/health.svg)

```
[![Health](https://phpackages.com/badges/chrgriffin-collection-macro-thanos/health.svg)](https://phpackages.com/packages/chrgriffin-collection-macro-thanos)
```

###  Alternatives

[inc2734/wp-breadcrumbs

A library for WordPress breadcrumbs.

1544.6k1](/packages/inc2734-wp-breadcrumbs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
