PHPackages                             webtechnick/laravel-macros - 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. webtechnick/laravel-macros

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

webtechnick/laravel-macros
==========================

a useful set of collection macros for laravel

v1.0(8y ago)010MITPHP

Since Sep 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/webtechnick/laravel-macros)[ Packagist](https://packagist.org/packages/webtechnick/laravel-macros)[ RSS](/packages/webtechnick-laravel-macros/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

laravel-macros
==============

[](#laravel-macros)

A useful set of macros for laravel's collection.

Install
-------

[](#install)

Install via composer

`composer require webtechnick/laravel-macros`

Add the service provider to `config/app.php`

```
'providers' => [
    // ...
    WebTechNick\LaravelMacros\LaravelMacroServiceProvider::class,
]

```

Macros
------

[](#macros)

List of useable macros

### noPreserveReverse

[](#nopreservereverse)

Consider the following:

```
$col = collect(['foo', 'bar', 'baz']);

for ($i = 0; $i < count($col); $i++) {
   echo $col[$i];
}
// foo, bar, baz. expected.

$colreverse = $col->reverse();
for ($i = 0; $i < count($colreverse); $i++) {
   echo $colreverse[$i];
}
// also foo, bar, baz because keys are preserved by default. unexpected.

$colnopreserve = $col->noPreserveReverse();
for ($i = 0; $i < count($colnopreserve); $i++) {
   echo $colnopreserve[$i];
}
// baz, bar, foo. expected.

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3175d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11288cf7d118c49c118ca38127380beffe290cf84a4b01243e4177e6e8fd319c?d=identicon)[webtechnick](/maintainers/webtechnick)

---

Top Contributors

[![webtechnick](https://avatars.githubusercontent.com/u/26438?v=4)](https://github.com/webtechnick "webtechnick (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webtechnick-laravel-macros/health.svg)

```
[![Health](https://phpackages.com/badges/webtechnick-laravel-macros/health.svg)](https://phpackages.com/packages/webtechnick-laravel-macros)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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