hahadu/laravel-apidoc-generator

Generate beautiful API documentation from your Laravel application

v0.3.1 2023-03-20 07:10 UTC

This package is auto-updated.

Last update: 2024-10-21 07:20:47 UTC


README

Automatically generate your API documentation from your existing Laravel/Lumen/Dingo routes.

Latest Stable VersionTotal Downloads License codecov.io Scrutinizer Code Quality Build Status StyleCI

Installation

PHP 7.2 and Laravel/Lumen 8.1 or higher are required.

If your application does not meet these requirements, you can check out the 3.x branch for older releases.

composer require hahadu/laravel-apidoc-generator

and

composer dump or composer update 

Laravel

Publish the config file by running:

php artisan vendor:publish --provider="Hahadu\ApiDoc\ApiDocGeneratorServiceProvider" --tag=apidoc-config

This will create an apidoc.php file in your config folder.

Lumen

  • When using Lumen, you will need to run composer require mpociot/laravel-apidoc-generator instead.
  • Register the service provider in your bootstrap/app.php:
$app->register(\Hahadu\ApiDoc\ApiDocGeneratorServiceProvider::class);
  • Copy the config file from vendor/mpociot/laravel-apidoc-generator/config/apidoc.php to your project as config/apidoc.php. Then add to your bootstrap/app.php:
$app->configure('apidoc');

Documentation

php artisan apidoc:generate

Check out the documentation at the Beyond Code homepage.

License

The Laravel API Documentation Generator is free software licensed under the MIT license.