hurongsheng / laravel-route-doc by hurongsheng

easily create doc based on route.php
153
1
2
Package Data
Maintainer Username: hurongsheng
Maintainer Contact: plokm031004@126.com (hurongsheng)
Package Create Date: 2016-08-01
Package Last Update: 2017-09-19
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-04-23 03:05:20
Package Statistics
Total Downloads: 153
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

laravel-route-doc --For Laravel 5.*

create api doc based on route.php & controller's document.

Install

Require this package with composer using the following command:

composer require hurongsheng/laravel-route-doc

Usage

add hurongsheng\LaravelRouteDoc\RouteDocServiceProvider::class into config/app.php--providers
php artisan vendor:publish --provider="hurongsheng\LaravelRouteDoc\RouteDocServiceProvider"
php artisan migrate
declare SomeController extend hurongsheng\LaravelRouteDoc\Controllers\RouteDocController;
and declare Route::controller() SomeController;
hurongsheng\LaravelRouteDoc\Controllers\RouteDocController extend App\Http\Controllers\Controller

     config:config/route_doc.php
     RouteDocController@getManage return default view of doc
     RouteDocController@getList return default view of doc
     
     visit manage and click update route&update doc then wait reload
     

Rules in controller document

/**
 * @description   function description
 * @param Request $request
 * @param         $id
 * @request       $name
 * @request       $something
 * @return SomeClass
 * @author your name
 */
 
 @request==@param

Helper

add @description @request document when in phpstorm

http://jingyan.baidu.com/article/48b558e35b81c27f38c09ab7.html