Download the PHP package biggold/apidoc-for-laravel without Composer

On this page you can find all versions of the php package biggold/apidoc-for-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package apidoc-for-laravel

larvel接口文档生成,测试工具生成工具

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

基本使用方法

  1. composer 安装包:

    composer require biggold/apidoc-for-laravel

  2. 配置服务提供者, config/app.php

    'providers' => [ Biggold\Apidoc\ApiDocServiceProvider::class ]

  3. 在controller方法上编写文档,具体编写见下面"文档编写规则"
  4. 生成文档(生成前会删除所有文档): php artisan doc:generate
  5. 查看文档: http://project-domain/docs/index.html
  6. 清空所有文档: php artisan doc:cleanall

基本用法生成物描述

生成物包含文档页和测试工具页,下面是截图:
文档图片:

工具图片:

文档编写方法:

基本模板

    /**
     * @name 用户中心-登录
     * @description 用户登录接口
     * @param username:登录邮箱 @ParamTest [email protected]
     * @param password:登录密码 @ParamTest 12345678
     *
     * @response 通用格式:{"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

@name

接口名称

@description

接口描述

@param

参数标签,代表http请求的参数描述,格式如下:@Param 参数名称:参数描述 @ParamTest 参数默认测试值(会自动填充到测试表单中)

@response

参数结果描述,显示时候显示在\<pre>\</pre>中保存格式

接口分组

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


All versions of apidoc-for-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
composer-plugin-api Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package biggold/apidoc-for-laravel contains the following files

Loading the files please wait ....