for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Mpociot\ApiDoc;
use Illuminate\Support\ServiceProvider;
use Mpociot\ApiDoc\Commands\GenerateDocumentation;
use Mpociot\ApiDoc\Commands\RebuildDocumentation;
class ApiDocGeneratorServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
$this->loadViewsFrom(__DIR__.'/../resources/views/', 'apidoc');
$this->publishes([
__DIR__.'/../resources/views' => app()->basePath().'/resources/views/vendor/apidoc',
], 'apidoc-views');
__DIR__.'/../config/apidoc.php' => app()->basePath().'/config/apidoc.php',
], 'apidoc-config');
$this->mergeConfigFrom(__DIR__.'/../config/apidoc.php', 'apidoc');
$this->bootRoutes();
if ($this->app->runningInConsole()) {
$this->commands([
GenerateDocumentation::class,
RebuildDocumentation::class,
]);
}
* Register the API doc commands.
public function register()
//
protected function bootRoutes()
if ($this->app['config']->get('apidoc.type', 'static') == 'laravel') {
$this->loadRoutesFrom(
__DIR__.'/../routes/laravel.php'
);