定制 pietmarcus/modeldocgenerator 二次开发

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

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

pietmarcus/modeldocgenerator

Composer 安装命令:

composer require pietmarcus/modeldocgenerator

包简介

PHPDoc generator for Eloquent models

README 文档

README

Create phpDocs for Eloquent models straight from the tables in your database. This package was inspired by the Automatic phpDocs for models of barryvdh for Laravel projects and uses parts of its code.

Install

Require this package with composer using the following command:

composer require --dev pietmarcus/modeldocgenerator

Configuration

Create a configuration file for the settings of this package and save it as modeldocgenerator-config.php in the root of your project or in a config directory within the root of your project with the following contents:

<?php
use Illuminate\Database\Capsule\Manager as Capsule;

// Define the directory where the models reside.
// Remember to change the value if the config-file is in a config-directory
define('MODELS_DIRECTORY', __DIR__ . '/src/Models');

// Define the root namespace of the models
define('ROOT_NAMESPACE', 'App\Models');

// Load the global settings
$config    = require_once __DIR__ . '/src/settings.php';

// Boot Eloquent
$capsule   = new Capsule;
$capsule->addConnection($config['settings']['db']);
$capsule->setAsGlobal();
$capsule->bootEloquent();

Edit the file as needed for your project.

Generating documentation

Execute the generator with the following command from the root of your project:

vendor\bin\modelDocGenerator

By default models that already have a phpDoc will be skipped. To force overwriting existing documentation supply --overwrite to the command:

vendor\bin\modelDocGenerator --overwrite

License

The Model Doc Generator is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固