raalveco/scaffolding
Composer 安装命令:
composer require raalveco/scaffolding
包简介
Scaffold Generator - Laravel 5 & Metronic Template
README 文档
README
Library that simplifies creating CRUD, with which we will create Controllers, Models, Views, Migrations, Seeds & Routes in seconds.
Instalación
To install the package you need to add dependency on our composer.json at the root of laravel.
{ "require": { "raalveco/scaffolding": "dev-master" } }
composer update
Laravel 5.2
In the $providers array add the following service provider for this package.
// config/app.php 'providers' => [ Raalveco\Scaffolding\ScaffoldingServiceProvider::class, ];
Usage
If you want to create a simple catalog for an entity, you must enter the console the following command:
php artisan make:scaffold Customer --fields="rfc:string:13[required|maxlength:13|minlength:12], first_name:string:100[required|alpha], last_name:string:100[required|alpha], email:string:100[required|email]"
This will create the bass for a Book model structure, will be created the following files:
Controller:
app/Http/CustomersController.php
Model:
app/Models/Customer.php
Migration:
database/migrations/0000_00_00_000000_create_customers_table.php
Seed:
database/seeds/CustomersSeeder.php
Lang:
resources/lang/en/customers.php
resources/lang/es/customers.php
Views:
resources/views/customers/index.blade.php
resources/views/customers/new.blade.php
resources/views/customers/edit.blade.php
Routes:
app/Http/routes.php (Edited)
After running the command: make:scaffold, we should run a migrate and if necessary run the seeder that just generated.
php artisan migrate
php artisan db:seed --class=CustomersSeeder
raalveco/scaffolding 适用场景与选型建议
raalveco/scaffolding 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 277 次下载、GitHub Stars 达 2, 最近一次更新时间为 2015 年 09 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 raalveco/scaffolding 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 raalveco/scaffolding 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 277
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-28