PHPackages                             wenma1993/laravel-doc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wenma1993/laravel-doc

ActiveLibrary

wenma1993/laravel-doc
=====================

Laravel doc and test html

v0.1.8(3y ago)219MITPHPPHP &gt;=7.2.0

Since Dec 24Pushed 3y agoCompare

[ Source](https://github.com/wenma1993/laravel-doc)[ Packagist](https://packagist.org/packages/wenma1993/laravel-doc)[ RSS](/packages/wenma1993-laravel-doc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

laravel接口文档生成,测试工具生成工具
======================

[](#laravel接口文档生成测试工具生成工具)

> 目前已经是基本可用版本，不过测试工具返回类型只有json类型

基本使用方法
======

[](#基本使用方法)

1. composer 安装包:

> composer require --dev wenma1993/laravel-doc

2. 配置服务提供者, config/app.php 在 'providers'中加入

> Apidoc\\ApiDocServiceProvider::class,

3. 在controller方法上编写文档,具体编写见下面"文档编写规则"
4. 生成文档(生成前会删除所有文档):

> php artisan doc:generate {route} 增加 route 前缀匹配生成 默认全部

5. 查看文档:
6. 清空所有文档:

> php artisan doc:cleanall

基本用法生成物描述
=========

[](#基本用法生成物描述)

生成物包含文档页和测试工具页，下面是截图:
文档图片: [![](./resources/example/doc.png)](./resources/example/doc.png)工具图片: [![](./resources/example/tool.png)](./resources/example/tool.png)

文档编写方法：
=======

[](#文档编写方法)

### 基本模板

[](#基本模板)

```
    /**
     * @Desc 新闻列表
     * @Description 获得新闻列表数据接口
     * @H type int 资讯类型 9 Must
     * @Header type int 资讯类型 9 Must
     * @Param tag string 资讯类型 demo
     * @Param isContent int 是否展示内容:1展示,0不展示,默认0 demo
     * @Param platformId int 平台ID 1
     * @Response 通用格式:{"message":{"code":响应码,"message":"错误描述"},"data":{}}
     * data{
     *    userid:"用户id，值为0表示用户未登录",
     *    nickname: "用户昵称",
     *    expired: 最后有效时间（时间戳秒）,-1
     * }
     */
     public function login(Request $request){}
```

```
    Route::group(['prefix' => 'auth', 'middleware'=>[], 'grouptitle'=>'用户中心'], function(){
        Route::post('login','Auth\LoginController@login')->name("auth.login");
    });
```

### 标签描述

[](#标签描述)

> 标签解析规则方法注释中@开头，空格结尾，空格过后是标签内容两边的空格将去掉,内容内的@xxx将不作为标签识别，参数标签@Param做了特殊处理可以包含默认参数测试标签@ParamTest

#### @Desc

[](#desc)

> 接口名称

#### @Description

[](#description)

> 接口描述

#### @Header

[](#header)

> 支持header 参数

#### @Param

[](#param)

> 参数标签，代表http请求的参数描述，格式如下:@Param type int 资讯类型 9 Must @Param 字段名称 类型 注释 例值 是否必传

#### @Response

[](#response)

> 参数结果描述，显示时候显示在&lt;pre&gt;&lt;/pre&gt;中保存格式

### 接口分组

[](#接口分组)

> 文档中支持用户分组的,如模板中使用'grouptitle'=&gt;'用户中心'为路由分组命名为"用户中心"，这将在文档中体现，如果没有这个分组标题，将不在文档中体现分组,文档上最好是一层分组，如果有多层将一次显示，但是没有层次缩进

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~207 days

Recently: every ~259 days

Total

6

Last Release

1295d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcea49a6e3b660147392ab58a1e938c394f72c17a18566e4b78c033d5fca6875?d=identicon)[wenwen1993](/maintainers/wenwen1993)

---

Top Contributors

[![orangesir](https://avatars.githubusercontent.com/u/7788128?v=4)](https://github.com/orangesir "orangesir (1 commits)")

### Embed Badge

![Health badge](/badges/wenma1993-laravel-doc/health.svg)

```
[![Health](https://phpackages.com/badges/wenma1993-laravel-doc/health.svg)](https://phpackages.com/packages/wenma1993-laravel-doc)
```

###  Alternatives

[orchestra/workbench

Workbench Companion for Laravel Packages Development

8017.0M43](/packages/orchestra-workbench)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
