PHPackages                             shencongcong/laravel-curd - 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. shencongcong/laravel-curd

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

shencongcong/laravel-curd
=========================

1.1.3(6y ago)446PHP

Since Dec 9Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (6)Used By (0)

 laravelCurd
=============

[](#-laravelcurd-)

 laravelCurd

Installing
----------

[](#installing)

```
$ composer require shencongcong/laravel-curd ~1.0
```

配置
--

[](#配置)

### Laravel 应用

[](#laravel-应用)

在 `config/app.php` 注册 ServiceProvider

```
'providers' => [
    // ...
     Shencongcong\LaravelCurd\LaravelCurdServiceProvider::class,
],
'aliases' => [
    // ...
     'LaravelCurd'=> Shencongcong\LaravelCurd\Facade::class,
],
```

使用
--

[](#使用)

```
use Event
use App\Model\Test;

1. 增加(add)
// 增加数据处理如需要处理业务加上这段代码,默认将laravel的request请求中的数据传入(没有业务处理则省略)
 $arr = ['id'=>1,'name'=>'hlcc']; //处理好的数据
 Event::listen("curd:filterData", function($m, $data) use($arr){
        return $arr;
 });

 //增加逻辑前面如需要处理业务加上这段代码(没有业务处理则省略)
 Event::listen("curd:beforeAdd", function($m, $data){
        //todo
 });

  // 增加逻辑后面如需要处理业务加上这段代码(没有业务处理则省略)
  Event::listen("curd:afterAdd", function($m,$data){
     //todo
  });

 // Test 是Model
 \LaravelCurd::make(Test::class)->add();

  // update、list、detail、delete、restore 等event事件从源码中查看
 2.  修改(update)
 \LaravelCurd::make(Test::class)->update();

 3.  列表(list)
  \LaravelCurd::make(Test::class)->list($pageSize,$withTrashed);
  $pageSize 默认是0 不分页 2 表示每页展示2条
  $withTrashed 默认是true, 表示软删除的不展示, false 表示软删除的也展示出来

 4.  详情(detail)
    \LaravelCurd::make(Test::class)->detail();

 5. 删除(delete)
    \LaravelCurd::make(Test::class)->delete($hasForce);
    $hasForce 默认是false 表示软删除 true 表示硬删除

 6. 软删除恢复(restore)
  \LaravelCurd::make(Test::class)->restore();

```

License
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

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 ~9 days

Total

5

Last Release

2310d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/shencongcong-laravel-curd/health.svg)

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

###  Alternatives

[rubix/tensor

A library and extension that provides objects for scientific computing in PHP.

2751.4M5](/packages/rubix-tensor)[kartik-v/yii2-editable

An enhanced editable widget for Yii 2.0 that allows easy editing of displayed data with numerous configuration possibilities.

1163.2M59](/packages/kartik-v-yii2-editable)[spatie/query-string

Manipulate query strings

161757.7k3](/packages/spatie-query-string)[kartik-v/yii2-widget-spinner

A widget to render animated CSS3 loading spinners with VML fallback for IE (sub repo split from yii2-widgets)

283.9M3](/packages/kartik-v-yii2-widget-spinner)

PHPackages © 2026

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