rakib01/laravel-model-docs-md

Generate Markdown documentation for all Eloquent models in Laravel.

Maintainers

Package info

github.com/Rakib01/laravel-model-docs-md

pkg:composer/rakib01/laravel-model-docs-md

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 20

Open Issues: 0

v1.0.2 2025-12-23 07:47 UTC

This package is auto-updated.

Last update: 2026-03-23 08:19:18 UTC


README

A Laravel package that automatically generates Model Documentation in Markdown format (.md). Perfect for documenting your application's Eloquent models โ€” their attributes, relationships, casts, and more.

๐Ÿš€ Features

  • ๐Ÿ“„ Generate Markdown documentation for all Eloquent models in one file
  • โš™๏ธ Configurable output directory and formatting
  • ๐Ÿง  Detects attributes, relationships, casts, fillable, hidden, and appended fields
  • ๐Ÿ•น๏ธ Simple Artisan command
  • ๐Ÿงฉ Fully open-source and easy to extend

๐Ÿงช Installation

Require the package via Composer:

composer require rakib01/laravel-model-docs-md

โš™๏ธ Publish Configuration

You can publish the configuration file using:

php artisan vendor:publish --provider="Rakib01\\LaravelModelDocsMd\\ModelDocsMdServiceProvider" --tag=config

This will publish a config file at:

config/modeldocsmd.php

๐Ÿงพ Generate Model Documentation

Once installed, simply run:

php artisan model-docs-md:generate

This command will inspect all models in your app/Models directory and generate a single file named:

storage/app/model-docs.md

Each model will be represented as a section in the file, similar to this:

๐Ÿงฉ App\Models\User

Table: users

Columns:

Name Type Cast
id bigint int
name varchar -
email varchar -
password varchar -

Fillable: name, email, password
Hidden: password, remember_token
Appends: is_verified

Relationships:

  • posts โ†’ Post

All models will be appended sequentially in this same Markdown file โ€” allowing you to have a complete model documentation in one place.

๐Ÿ› ๏ธ Requirements

  • PHP >= 8.1
  • Laravel >= 12.x or 11.x, 10.x

๐Ÿค Contributing

Pull requests are welcome! If you find a bug or have a feature request, please open an issue on GitHub Issues.

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license.

Created with โค๏ธ by Rakibul Hasan