Package Data | |
---|---|
Maintainer Username: | YuBing |
Maintainer Contact: | zhwei.yes@gmail.com (zhwei) |
Package Create Date: | 2016-01-27 |
Package Last Update: | 2023-01-06 |
Home Page: | http://lego.zhw.in |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-17 03:05:11 |
Package Statistics | |
---|---|
Total Downloads: | 7,715 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 110 |
Total Watchers: | 19 |
Total Forks: | 28 |
Total Open Issues: | 45 |
注意:lego 尚处于开发阶段,1.0版本发布之前主要接口仍有调整的可能性,请注意查看 release note !
$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]);
<!doctype html>
<html lang="en">
<head>
@include('lego::styles')
</head>
<body>
{!! $form !!}
@include('lego::scripts')
</body>
</html>
composer require "wutongwan/lego"
Add these lines to providres
array of config file config/app.php
.
// Lego require LaravelCollective/html ,So need to add it's ServiceProvider.
Collective\Html\HtmlServiceProvider::class,
// Lego require mewebstudio/Purifier ,So need to add it's ServiceProvider.
Mews\Purifier\PurifierServiceProvider::class,
Lego\LegoServiceProvider::class,
Lego require
mewebstudio/Purifier
, So need to publish it's assetsVisit https://github.com/mewebstudio/Purifier for more detail.
php artisan vendor:publish --provider="Mews\Purifier\PurifierServiceProvider"
php artisan vendor:publish --tag=lego-assets --force
Tips:
Add to
post-update-cmd
, In order to update lego static files Automatically.
用了快一年的zofe/rapyd-laravel,整体觉得非常好用,但内部确实不少代码年久失修,比较脏,有的组件也不适合中国的情况(比如google map)。
所以我们几个小伙伴想了很久,还是决定重新造个轮子,参考rapyd的思路,做一个我们自己用着更顺手的脚手架库。
起名Lego,也是向乐高致敬,能用简单的Block搭建摩天大厦是我们的梦想。
现在整体代码还是非常初级的版本,有兴趣的朋友欢迎关注以及和我们讨论,但由于整个项目是以提高团队自身效率为最优先前提的,可能我们会独断一些,不会刻意的做的太通用。