承接 mileschou/schemarkdown 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mileschou/schemarkdown

最新稳定版本:v2.1.0

Composer 安装命令:

composer require mileschou/schemarkdown

包简介

The schema generate helper

README 文档

README

tests codecov Codacy Badge Latest Stable Version Total Downloads License

The core library for generate Markdown document and Laravel Eloquent Model classes from database schema.

Installation

Use Composer to install:

composer require mileschou/schemarkdown

Usage

Use following command to generate schema documents:

cd /path/to/your-laravel-project
php artisan schema:markdown

Schema document are stored to docs/schema directory default. Use the --path option to change it.

In the other framework, you must provide config file like Laravel. Use --config option to specify customize configuration.

This tool will load .env before load config. Use the --env option to specify .env path.

Use the --database option to specify connection name in Laravel config to generate the document of one database.

Use the --overwrite option if you want to overwrite the exists document.

Use following command to generate eloquent models:

cd /path/to/your-laravel-project
php artisan schema:model

It's will generate model code into app/Models directory (Laravel 8 default), use the --path option can change output dir. If want to change namespace, use the --namespace option.

In the other framework but using Eloquent ORM library, you must provide config file like laravel project. Use --config option to specify customize configuration.

If only want build one connection, use the --database option to specify.

Use the --overwrite option if you want to overwrite exist code.

Example

Here is example SQL, import MySQL and run following command:

php artisan schemarkdown --config=tests/Fixtures/database.php --database=examples --output-dir=examples

It will generate this Markdown documents.

Troubleshooting

Use -vv option to see info log.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-20