Update: we're moving to Scribe, which will be ready for v1 in a few weeks. Check out the list of changes to get ready.
Automatically generate your API documentation from your existing Laravel/Lumen/Dingo routes.
php artisan apidoc:generate
PHP 7.2 and Laravel/Lumen 5.7 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 --dev mpociot/laravel-apidoc-generatorPublish the config file by running:
php artisan vendor:publish --provider="Mpociot\ApiDoc\ApiDocGeneratorServiceProvider" --tag=apidoc-configThis will create an apidoc.php file in your config folder.
- When using Lumen, you will need to run composer require mpociot/laravel-apidoc-generatorinstead.
- 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.phpto your project asconfig/apidoc.php. Then add to yourbootstrap/app.php:
$app->configure('apidoc');Check out the documentation at ReadTheDocs. Don't forget to check out the migration guide if you're coming from v3 to v4.
The Laravel API Documentation Generator is free software licensed under the MIT license.
