appwise-labs/laravel-docs
最新稳定版本:v0.1.3
Composer 安装命令:
composer require appwise-labs/laravel-docs
包简介
OpenApi documentation for Laravel projects with web viewer
README 文档
README
Introduction
Installation
Require the package with Composer:
composer require appwise-labs/laravel-docs
This packages uses Laravel's autodiscovery:
If this doesn't work correctly for some reason, you can manually add the ServiceProvider to your config/app.php.
'providers' => [ //... AppwiseLabs\LaravelDocs\LaravelDocsServiceProvider::class ];
Finally, publish the default config file config/laravel-docs.php using
php artisan laravel-docs:install
or
php artisan vendor:publish --provider="AppwiseLabs\LaravelDocs\LaravelDocsServiceProvider" --tag="config"
Usage
Basic usage
Put your openapi.yaml file in resources/docs/openapi.yaml and run
This path can be changed using the config/laravel-docs.php config file.
The default route to view your docs is /docs.
Gate
By default, the docs are only accessible in the local environment.
You can change this by using the gate canViewDocs in your App\Providers\AuthServiceProvider file.
For example:
Gate::define('canViewDocs', function ($user = null) { return true; });
统计信息
- 总下载量: 2.82k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-05