定制 mpmg/laravue 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mpmg/laravue

Composer 安装命令:

composer require mpmg/laravue

包简介

Code generation for MPMG projects that use Laravel and VueJs tecnologies.

README 文档

README

Code generation for MPMG projects that use Laravel and VueJs tecnologies.

Instalation

composer require mpmg/laravue
php artisan laravue:install
php artisan vendor:publish --provider="Mpmg\Laravue\LaravueServiceProvider"
php artisan migrate
php artisan passport:install

Documentation

Commands

Build

php artisan laravue:build <model>

Generates code for backend (Laravel) and frontend (VueJs) for model <model>

Build with options

php artisan laravue:build <model> <-f|--fields>

Comand Description

Generates code for backend (Laravel) and frontend (VueJs) for model <model> with fields <-f|--fields>

Examples

Supose we have the situation that users have posts and models are Users

Field Type Detais
id integer not null; primary key
name string not null
age integer nullable

Posts

Field Type Detais
id integer not null; primary key
user_id int not null; foreing key for users
text string not null
created_at datetime not null
approved boolean not null

Command for generate User model

php artisan laravue:build User -f name:s,age:i.n

Command for generate Post model

php artisan laravue:build Post -f user_id:i,text:s,age:i.n,created_at:dt,approved:b

Fields types and shortcus

Shortcut Generate Description
bpk $table->bigIncrements('id'); Incrementing ID using a "big integer" equivalent.
bi $table->bigInteger('votes'); BIGINT equivalent to the table
by $table->binary('data'); BLOB equivalent to the table
b $table->boolean('confirmed'); BOOLEAN equivalent to the table
c.4 $table->char('name', 4); CHAR equivalent with a length
d $table->date('created_at'); DATE equivalent to the table
dt $table->dateTime('created_at'); DATETIME equivalent to the table
de.5-2 $table->decimal('amount', 5, 2); DECIMAL equivalent with a precision and scale
db.15-8 $table->double('column', 15, 8); DOUBLE equivalent with precision, 15 digits in total and 8 after the decimal point
e.foo;bar $table->enum('choices', array('foo', 'bar')); ENUM equivalent to the table
f $table->float('amount'); FLOAT equivalent to the table
pk $table->increments('id'); Incrementing ID to the table (primary key).
i $table->integer('votes'); INTEGER equivalent to the table
lt $table->longText('description'); LONGTEXT equivalent to the table
mi $table->mediumInteger('numbers'); MEDIUMINT equivalent to the table
mt $table->mediumText('description'); MEDIUMTEXT equivalent to the table
m $table->morphs('taggable'); Adds INTEGER taggable_id and STRING taggable_type
si $table->smallInteger('votes'); SMALLINT equivalent to the table
ti $table->tinyInteger('numbers'); TINYINT equivalent to the table
sd $table->softDeletes(); Adds deleted_at column for soft deletes
s $table->string('email'); VARCHAR equivalent column
s.100 $table->string('name', 100); VARCHAR equivalent with a length
tx $table->text('description'); TEXT equivalent to the table
t $table->time('sunrise'); TIME equivalent to the table
ts $table->timestamp('added_on'); TIMESTAMP equivalent to the table
tt $table->timestamps(); Adds created_at and updated_at columns
rt $table->rememberToken(); Adds remember_token as VARCHAR(100) NULL
.n ->nullable() Designate that the column allows NULL values
.#5# ->default(5) Declare a default value for a column
.+ ->unsigned() Unsigned integer
.u ->unique() Unique field
.u* $table->unique['un1','unN']; Fields that are unique together
pf $table->string(11); VARCHAR size 11 equivalent column
pj $table->string(14); VARCHAR size 14 equivalent column
fj $table->string(14); VARCHAR size 14 equivalent column
vm $table->decimal('money', 16,2); DECIMAL equivalent with a precision 2 and scale 16

Changelog

Please see CHANGELOG for more information what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

mpmg/laravue 适用场景与选型建议

mpmg/laravue 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 915 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 10 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「vuejs」 「vue」 「mpmg」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mpmg/laravue 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mpmg/laravue 我们能提供哪些服务?
定制开发 / 二次开发

基于 mpmg/laravue 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 915
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-10-28