yyfjj / laravel-apidoc-generator
Generate beautiful API documentation from your Laravel application
1.0
2019-07-24 05:15 UTC
Requires
- php: >=7.0.0
- fzaninotto/faker: ~1.8
- illuminate/console: 5.5.* || 5.6.* || 5.7.* || 5.8.*
- illuminate/routing: 5.5.* || 5.6.* || 5.7.* || 5.8.*
- illuminate/support: 5.5.* || 5.6.* || 5.7.* || 5.8.*
- league/flysystem: ^1.0
- mpociot/documentarian: ^0.2.0
- mpociot/reflection-docblock: ^1.0.1
- ramsey/uuid: ^3.8
Requires (Dev)
- dingo/api: 2.0.0-alpha1
- league/fractal: ^0.17.0
- mockery/mockery: ^1.2.0
- orchestra/testbench: 3.5.* || 3.6.* || 3.7.*
- phpunit/phpunit: ^6.0.0 || ^7.4.0
Suggests
- league/fractal: Required for transformers support
- nunomaduro/collision: For better reporting of errors that are thrpwn when generating docs
This package is auto-updated.
Last update: 2025-03-01 00:28:00 UTC
README
Automatically generate your API documentation from your existing Laravel/Lumen/Dingo routes. Here's what the output looks like.
php artisan apidoc:generate
Installation
PHP 7 and Laravel 5.5 or higher are required.
composer require --dev mpociot/laravel-apidoc-generator
Laravel
Publish the config file by running:
php artisan vendor:publish --provider="Mpociot\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(\Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class);
- Copy the config file from
vendor/mpociot/laravel-apidoc-generator/config/apidoc.php
to your project asconfig/apidoc.php
. Then add to yourbootstrap/app.php
:
$app->configure('apidoc');
Documentation
Check out the documentation at ReadTheDocs.
License
The Laravel API Documentation Generator is free software licensed under the MIT license.