PHPackages                             chenpkg/laravel-helpers - 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. chenpkg/laravel-helpers

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

chenpkg/laravel-helpers
=======================

laravel helpers

2.1.3(4y ago)123MITPHPPHP ^8.0.2

Since Dec 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/chenpkg/laravel-helpers)[ Packagist](https://packagist.org/packages/chenpkg/laravel-helpers)[ RSS](/packages/chenpkg-laravel-helpers/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (12)Used By (0)

 laravel-helpers
=================

[](#-laravel-helpers-)

 laravel helpers.

功能
--

[](#功能)

- Scope 模型查询作用域构建
- Batch 模型批量修改
- Tree 模型无限极分类树
- MetaPaginator 模型分页自定义添加数据

安装
--

[](#安装)

```
$ composer require chenpkg/laravel-helpers
```

使用
--

[](#使用)

### [Scope 使用示例](https://github.com/chenpkg/laravel-helpers/tree/master/tests/example.php)

[](#scope-使用示例)

### Batch 批量修改

[](#batch-批量修改)

> 功能来源于 [laravelBatch](https://github.com/mavinoo/laravelBatch)

```
use LaravelHelpers\Support\Batch;

$update = [
    [
        'id'   => 1,
        'name' => '李四'
    ],
    [
        'id'   => 5,
        'name' => '小红'
    ],
    [
        'id'   => 5,
        'name' => '李雷雷'
    ]
];

Batch::update(new User(), $update, 'id');
```

### [Tree 使用示例](https://github.com/chenpkg/laravel-helpers/tree/master/src/Support/Tree/README.MD)

[](#tree-使用示例)

### MetaPaginator

[](#metapaginator)

```
// 分页添加自定义数据
$result = User::where('age', '>', 18)->metaPaginate();

$result->addMeta('count', 1)->addMeta('total', 1000);
// or
$result->setMeta([
  'count' => 1,
  'total' => 1000
]);
```

License
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Every ~8 days

Total

11

Last Release

1526d ago

Major Versions

1.2.1 → 2.0.02022-01-18

PHP version history (2 changes)1.0.0PHP ^8.0

2.1.0PHP ^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6f7b35a5aa35e5888dbf72ead3b664056957250b39d9bb71831a237406df9d0?d=identicon)[chen980523](/maintainers/chen980523)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/chenpkg-laravel-helpers/health.svg)

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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