birhanu/laradocs 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

birhanu/laradocs

最新稳定版本:v1.0.0

Composer 安装命令:

composer require birhanu/laradocs

包简介

Laravel API documentation generator

README 文档

README

Team Members

Name ID
Ararsa Derese ETS0152/13
Birhanu Worku ETS0279/13
Biruk Mesfin ETS0290/13
Bisrat Kebere ETS0306/13
Biyaol Mesay ETS0309/13

LaraDocs is a Laravel package that generates API documentation for your Laravel application. It provides both JSON and HTML formats for the documentation, making it easy to integrate and use.

Features

  • Automatically generates API documentation for your Laravel application.
  • Provides both JSON and HTML formats for the documentation.
  • Customizable HTML output with a modern, attractive design.
  • Easy to set up and use.

Installation

  1. Install the package via Composer:

    composer require birhanu/laradocs
  2. Publish the configuration and view files:

    php artisan vendor:publish --provider="Birhanu\Laradocs\LaradocsServiceProvider" --tag="config"
    php artisan vendor:publish --provider="Birhanu\Laradocs\LaradocsServiceProvider" --tag="views"
  3. Add the service provider to your config/app.php file (if not using auto-discovery):

    'providers' => [
        // Other service providers...
        Birhanu\Laradocs\LaradocsServiceProvider::class,
    ],

Configuration

The configuration file config/laradocs.php allows you to customize the behavior of the package. Here are some of the key options:

  • enabled: Enable or disable the package.
  • api_prefix: The prefix for the API documentation routes.
  • default_format: The default format for the documentation (json or html).
  • output_format: The format for the generated documentation files (json or yaml).
  • output_path: The path where the generated documentation files will be saved.
  • html_output: Enable or disable HTML output.

Usage

Access the documentation:

- JSON format: `http://your-app-url/api-docs/json`
- HTML format: `http://your-app-url/api-docs`

Customization

You can customize the HTML output by editing the Blade view file located at resources/views/vendor/laradocs/custom-ui.blade.php.

Testing

To run the tests, use the following command:

phpunit

License

LaraDocs is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-27