承接 rakib01/laravel-model-docs-md 相关项目开发

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

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

rakib01/laravel-model-docs-md

最新稳定版本:v1.0.2

Composer 安装命令:

composer require rakib01/laravel-model-docs-md

包简介

Generate Markdown documentation for all Eloquent models in Laravel.

README 文档

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-02