PHPackages                             wutongwan/lego - 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. [Admin Panels](/categories/admin)
4. /
5. wutongwan/lego

ActiveLibrary[Admin Panels](/categories/admin)

wutongwan/lego
==============

Yet another CRUD widgets for Laravel

0.3.18(7y ago)1107.7k28[17 issues](https://github.com/wutongwan/laravel-lego/issues)[28 PRs](https://github.com/wutongwan/laravel-lego/pulls)MITPHPPHP &gt;=7.0.0

Since Jan 27Pushed 3y ago18 watchersCompare

[ Source](https://github.com/wutongwan/laravel-lego)[ Packagist](https://packagist.org/packages/wutongwan/lego)[ Docs](https://github.com/wutongwan/laravel-lego)[ RSS](/packages/wutongwan-lego/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (11)Versions (129)Used By (0)

Laravel-Lego
------------

[](#laravel-lego)

[![tests](https://github.com/wutongwan/laravel-lego/workflows/tests/badge.svg)](https://github.com/wutongwan/laravel-lego/workflows/tests/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/207ee9e7be4ac68067375665459fd3792877c8029ba187e26bdea0667980bbde/68747470733a2f2f706f7365722e707567782e6f72672f7775746f6e6777616e2f6c65676f2f76657273696f6e2e706e67)](https://packagist.org/packages/wutongwan/lego)[![Total Downloads](https://camo.githubusercontent.com/b57c22066b086d53f9018c69f0636fcfd8543fe6831d86f4aadd156b307ae4a8/68747470733a2f2f706f7365722e707567782e6f72672f7775746f6e6777616e2f6c65676f2f642f746f74616c2e706e67)](https://packagist.org/packages/wutongwan/lego)

---

*注意：lego 尚处于开发阶段，1.0版本发布之前主要接口仍有调整的可能性，请注意查看 release note ！*

---

Example
-------

[](#example)

- UserController.php

```
$form = Lego::form(new User());

$form->addText('number', '编号')->required()->rule('numeric')->unique();
$form->addText('email', '邮箱')->required()->rule('email')->unique();

return $form->view('layout', ['form' => $form]);
```

- layout.blade.php

```

    Lego Form
    @include('lego::styles')

    {!! $form !!}
    @include('lego::scripts')

```

[![image](https://camo.githubusercontent.com/503ac8922a7e11eb2e3aac8bc190cacdb8448550a6ff64c935017dd6d5999383/687474703a2f2f7777312e73696e61696d672e636e2f626d6964646c652f38303162373830616777316638706a626f767465306a32306e383068346a727a2e6a7067)](https://camo.githubusercontent.com/503ac8922a7e11eb2e3aac8bc190cacdb8448550a6ff64c935017dd6d5999383/687474703a2f2f7777312e73696e61696d672e636e2f626d6964646c652f38303162373830616777316638706a626f767465306a32306e383068346a727a2e6a7067)

Required
--------

[](#required)

- php &gt;= 7.1
- Laravel &gt;= 6.0

Installment
-----------

[](#installment)

### 1、Composer

[](#1composer)

```
composer require wutongwan/lego
```

### 2、Publish lego assets

[](#2publish-lego-assets)

```
php artisan vendor:publish --tag=lego-assets --force
```

> **Tips:**
>
> To keep the assets up-to-date and avoid issues in future updates, you may add the command to the post-update-cmd scripts in your composer.json file:
>
> ```
> {
>      "scripts": {
>          "post-update-cmd": [
>              "@php artisan vendor:publish --tag=lego-assets --force"
>          ]
>      }
>  }
>
> ```

Documents
---------

[](#documents)

- Demo
- [Form 表单](./docs/form.md)
- [Fields 支持的输入类型](./docs/fields.md)
- [Filter 筛选器](./docs/filter.md)
- [Grid - 列表页](./docs/grid.md)
- [more ...](./docs/README.md)

Development
-----------

[](#development)

- 分支

    - master, 在 master 下开发及维护
- 当前版本在以下环境中开发并维护

    - Mac
    - Ubuntu
- Run Demo

    ```
    php demo/run.php [--host=127.0.0.1] [--port=8080]
    ```

---

起因
--

[](#起因)

用了快一年的[zofe/rapyd-laravel](https://github.com/zofe/rapyd-laravel),整体觉得非常好用,但内部确实不少代码年久失修,比较脏，有的组件也不适合中国的情况（比如google map）。

所以我们几个小伙伴想了很久，还是决定重新造个轮子，参考rapyd的思路,做一个我们自己用着更顺手的脚手架库。

起名Lego,也是向乐高致敬,能用简单的Block搭建摩天大厦是我们的梦想。

现在整体代码还是非常初级的版本,有兴趣的朋友欢迎关注以及和我们讨论,但由于整个项目是以提高团队自身效率为最优先前提的,可能我们会独断一些,不会刻意的做的太通用。

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 96.7% 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 ~17 days

Total

98

Last Release

2066d ago

Major Versions

0.3.18 → 1.0-beta.12020-06-19

PHP version history (3 changes)0.0.1PHP &gt;=7.0.0

1.0-beta.1PHP ^7.0

1.0-beta.9PHP ^7.1

### Community

Maintainers

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

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

---

Top Contributors

[![zhwei](https://avatars.githubusercontent.com/u/1446459?v=4)](https://github.com/zhwei "zhwei (609 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![micln](https://avatars.githubusercontent.com/u/4499674?v=4)](https://github.com/micln "micln (2 commits)")[![xiaojiaose](https://avatars.githubusercontent.com/u/2755044?v=4)](https://github.com/xiaojiaose "xiaojiaose (1 commits)")[![icedfish](https://avatars.githubusercontent.com/u/1222861?v=4)](https://github.com/icedfish "icedfish (1 commits)")[![Dylan-DPC](https://avatars.githubusercontent.com/u/99973273?v=4)](https://github.com/Dylan-DPC "Dylan-DPC (1 commits)")[![hellloveyy](https://avatars.githubusercontent.com/u/14924943?v=4)](https://github.com/hellloveyy "hellloveyy (1 commits)")

---

Tags

crudlaravelphpcrudwidgetadmin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wutongwan-lego/health.svg)

```
[![Health](https://phpackages.com/badges/wutongwan-lego/health.svg)](https://phpackages.com/packages/wutongwan-lego)
```

###  Alternatives

[serverfireteam/panel

Admin panel for Laravel applications

42532.2k2](/packages/serverfireteam-panel)

PHPackages © 2026

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