Add Sphinx doc

This commit is contained in:
shalvah
2019-04-26 00:42:38 +01:00
parent aa16387938
commit 8ebae10774
8 changed files with 468 additions and 2 deletions

38
docs/index.md Normal file
View File

@@ -0,0 +1,38 @@
# Overview
Automatically generate your API documentation from your existing Laravel/Lumen/[Dingo](https://github.com/dingo/api) routes. [Here's what the output looks like](http://marcelpociot.de/whiteboard/).
`php artisan apidoc:generate`
## Contents
* [Configuration](config.md)
* [Generating Documentation](generating-documentation.md)
* [Documenting Your API](documenting.md)
## Installation
> Note: PHP 7 and Laravel 5.5 or higher are required.
```sh
composer require mpociot/laravel-apidoc-generator
```
### Laravel
Publish the config file by running:
```bash
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`:
```php
$app->register(\Mpociot\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`:
```php
$app->configure('apidoc');
```