定制 qsun/model-annotation 二次开发

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

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

qsun/model-annotation

Composer 安装命令:

composer require qsun/model-annotation

包简介

README 文档

README

ModelAnnotation puts database schema aside with your model files for easy reference.

Add annotation to plain Laravel model files

<?php
/* MODEL ANNOTATION:
@property	$id                      Type: bigint(20) unsigned      Extra: auto_increment      Default: null      Key: PRI
@property	$name                    Type: varchar(255)             Extra:                     Default: null      Key: nil
@property	$email                   Type: varchar(255)             Extra:                     Default: null      Key: UNI
@property	$email_verified_at       Type: timestamp                Extra:                     Default: null      Key: nil
@property	$password                Type: varchar(255)             Extra:                     Default: null      Key: nil
@property	$remember_token          Type: varchar(100)             Extra:                     Default: null      Key: nil
@property	$created_at              Type: timestamp                Extra:                     Default: null      Key: nil
@property	$updated_at              Type: timestamp                Extra:                     Default: null      Key: nil

END MODEL ANNOTATION */

namespace App;

use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    /**

Usage

This package only works with MySQL for now.

  • Make sure you have backup or VCS.

  • Modify composer.json file, include following line for require section:

"require": {
    ...
    "qsun/model-annotation": "dev-master"
}
  • Run composer update to install newly added package

  • Add Service Provider in app.php:

'providers' => [
    ....
    qsun\ModelAnnotation\AnnotationServiceProvider::class
]
  • Run php artisan annotate:models to annotate model files

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2016-02-01