New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

mileschou/schemarkdown

The schema generate helper
1,827 4
Install
composer require mileschou/schemarkdown
Latest Version:v2.1.0
PHP:^8.0
Laravel:8 – 11
Older releases:5 · 6 · 7
License:MIT
Last Updated:Aug 3, 2024
Links: GitHub  ·  Packagist
Maintainer: MilesChou

Schemarkdown

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.

Related Packages

railroad/resora

A database access system.

90,607 0
yeswedev/laravel-cms

YWD Laravel CMS

3,288
vicgutt/laravel-inspect-db

Inspect and retrieve information about a given database

1,517 1
arikaim/db

Arikam CMS database package

1,384 1
shin1x1/laravel-table-admin

Laravel-Table-Admin Simple CRUD package for Laravel 4

1,251 22

Version History

Version Released PHP Laravel License
v2.1.0 ^8.0 ^8 | ^9 | ^10 | ^11 MIT
v2.0.1 ^7.2 | ^8.0 ^6 | ^7 | ^8 MIT
v2.0.0 ^7.2 | ^8.0 ^6 | ^7 | ^8 MIT
v1.0.0 >=7.1 ^5.6 | ^6 | ^7 | ^8 MIT
Pre-releases (5)
Version Released PHP Laravel License
v2.0.0-alpha5 ^7.2 | ^8.0 ^6 | ^7 | ^8 MIT
v2.0.0-alpha4 ^7.2 | ^8.0 ^6 | ^7 | ^8 MIT
v2.0.0-alpha3 ^7.2 | ^8.0 ^6 | ^7 | ^8 MIT
v2.0.0-alpha2 ^7.2 | ^8.0 ^6 | ^7 | ^8 MIT
v2.0.0-alpha1 ^7.2 | ^8.0 ^6 | ^7 | ^8 MIT