nonetallt/laravel-autoschema 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

nonetallt/laravel-autoschema

Composer 安装命令:

composer require nonetallt/laravel-autoschema

包简介

Generate markdown file describing all your laravel application models and their attributes.

README 文档

README

Generate markdown file describing all your laravel application models and their attributes. The schema can be used as a reference for both front- and back-end developers to keep track of properties that should or should not exist for a given model.

Example output

Installation

composer require nonetallt/laravel-autoschema --dev

Basic usage

php artisan schema:create

Properties

Attribute

The name of the attribute (usually column name).

Computed

Properties that have an accessor (getXAttribute) defined but no column in database are considered computed properties.

Fillable

Is the attribute mass assignable.

Relation

Is the attribute a method describing a relation.

Serialized

Is the attribute present after the object is serialized (to array or json). n/a for relations since it's not possible to know wether the object is loaded with a relation by static analysis. Useful for front-end developers since objects are serialized for responses.

Managing relations

Unfortunately, unlike the other properties, relations for models can't be easily distinguished by method signature or framework alone. To list your relations in the model you need to use @relation annotation in the relation method docblock.

/**
* @relation
*/
public function addresses()
{
    return $this->hasMany('App\Address', 'address_list_name', 'name');
}

Configuration

Publishing the configuration file

php artisan vendor:publish --provider="Nonetallt\LaravelAutoschema\AutoschemaServiceProvider"

Available options

  • output_path
  • model_directory
  • model_namespace
  • yes_string
  • no_string
  • print_table_name

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固