mirror of
https://github.com/ambieco/scribe.git
synced 2026-04-02 22:31:09 +08:00
1.2 KiB
1.2 KiB
Overview
Automatically generate your API documentation from your existing Laravel/Lumen/Dingo routes. Here's what the output looks like.
php artisan apidoc:generate
Contents
- How This Works
- Configuration
- Generating Documentation
- Documenting Your API
- Extending functionality with plugins
- Internal Architecture
Installation
Note: PHP 7 and Laravel 5.5 or higher are required.
composer require 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
- 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');