wutongwan / lego
Yet another CRUD widgets for Laravel
Installs: 7 715
Dependents: 0
Suggesters: 0
Security: 0
Stars: 110
Watchers: 19
Forks: 28
Open Issues: 45
Requires
- php: ^7.1
- ext-json: *
- ezyang/htmlpurifier: ^4.13
- illuminate/support: ^6.0 || ^7.0
- laravelcollective/html: ^6.0
- mobiledetect/mobiledetectlib: ^2.8
- phpoffice/phpspreadsheet: ^1.14
Requires (Dev)
- box/spout: ^2.7
- fzaninotto/faker: ^1.9
- laravel/laravel: @stable
- ongr/elasticsearch-dsl: ^6.0
- phpunit/phpunit: ^7.5.15 || ^8.4 || ^9.0
Suggests
- ongr/elasticsearch-dsl: Required to use the ElasticSearch Query.
- dev-master
- 1.0-beta.12
- 1.0-beta.11
- 1.0-beta.10
- 1.0-beta.9
- 1.0-beta.8
- 1.0-beta.7
- 1.0-beta.6
- 1.0-beta.5
- 1.0-beta.4
- 1.0-beta.3
- 1.0-beta.2
- 1.0-beta.1
- 0.3.x-dev
- 0.3.18
- 0.3.17
- 0.3.16
- 0.3.15
- 0.3.15-beta
- 0.3.14
- 0.3.13
- 0.3.12
- 0.3.11
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1-beta.15
- 0.2.x-dev
- 0.2.18
- 0.2.17
- 0.2.16
- 0.2.15
- 0.2.14
- 0.2.13
- 0.2.12
- 0.2.11
- 0.2.10
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.1.45
- 0.1.44
- 0.1.43
- 0.1.42
- 0.1.41
- 0.1.40
- 0.1.39
- 0.1.38
- 0.1.37
- 0.1.36
- 0.1.35
- 0.1.34
- 0.1.33
- 0.1.32
- 0.1.31
- 0.1.30
- 0.1.29
- 0.1.28
- 0.1.27
- 0.1.26
- 0.1.25
- 0.1.24
- 0.1.23
- 0.1.22
- 0.1.21
- 0.1.20
- 0.1.19
- 0.1.18
- 0.1.17
- 0.1.16
- 0.1.15
- 0.1.14
- 0.1.13
- 0.1.12
- 0.1.11
- 0.1.10
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.1
- dev-dependabot/npm_and_yarn/json5-1.0.2
- dev-dependabot/npm_and_yarn/tinymce-6.3.1
- dev-dependabot/npm_and_yarn/cypress-12.2.0
- dev-dependabot/github_actions/shivammathur/setup-php-2.23.0
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/github_actions/cypress-io/github-action-5
- dev-dependabot/npm_and_yarn/loader-utils-1.4.2
- dev-dependabot/github_actions/actions/cache-3.0.11
- dev-dependabot/github_actions/actions/checkout-3.1.0
- dev-dependabot/npm_and_yarn/terser-4.8.1
- dev-dependabot/npm_and_yarn/moment-2.29.4
- dev-dependabot/npm_and_yarn/async-3.2.4
- dev-dependabot/npm_and_yarn/minimist-1.2.6
- dev-dependabot/npm_and_yarn/tar-6.1.11
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/css-loader-5.2.7
- dev-dependabot/npm_and_yarn/postcss-7.0.36
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/composer/box/spout-tw-3.3
- dev-dependabot/npm_and_yarn/ssri-6.0.2
- dev-dependabot/npm_and_yarn/y18n-4.0.1
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/webpack-4.46.0
- dev-dependabot/npm_and_yarn/copy-webpack-plugin-6.4.1
- dev-dependabot/composer/ongr/elasticsearch-dsl-tw-7.1
- dev-dependabot/npm_and_yarn/ini-1.3.8
- dev-1.0-refactor
- dev-refactor-field-name
- dev-dependabot/npm_and_yarn/file-loader-6.2.0
This package is auto-updated.
Last update: 2024-11-06 17:23:00 UTC
README
注意:lego 尚处于开发阶段,1.0版本发布之前主要接口仍有调整的可能性,请注意查看 release note !
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
<!doctype html> <html lang="en"> <head> <title>Lego Form</title> @include('lego::styles') </head> <body> {!! $form !!} @include('lego::scripts') </body> </html>
Required
- php >= 7.1
- Laravel >= 6.0
Installment
1、Composer
composer require wutongwan/lego
2、Publish 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
Development
-
分支
- master, 在 master 下开发及维护
-
当前版本在以下环境中开发并维护
- Mac
- Ubuntu
-
Run Demo
php demo/run.php [--host=127.0.0.1] [--port=8080]
起因
用了快一年的zofe/rapyd-laravel,整体觉得非常好用,但内部确实不少代码年久失修,比较脏,有的组件也不适合中国的情况(比如google map)。
所以我们几个小伙伴想了很久,还是决定重新造个轮子,参考rapyd的思路,做一个我们自己用着更顺手的脚手架库。
起名Lego,也是向乐高致敬,能用简单的Block搭建摩天大厦是我们的梦想。
现在整体代码还是非常初级的版本,有兴趣的朋友欢迎关注以及和我们讨论,但由于整个项目是以提高团队自身效率为最优先前提的,可能我们会独断一些,不会刻意的做的太通用。