| 1 | <?php |
||
| 8 | |||
| 9 | class ApiDocGeneratorServiceProvider extends ServiceProvider |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Bootstrap the application events. |
||
| 14 | * |
||
| 15 | * @return void |
||
| 16 | */ |
||
| 17 | public function boot() |
||
| 18 | { |
||
| 19 | $this->loadViewsFrom(__DIR__.'/../../resources/views/', 'apidoc'); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Register the API doc commands |
||
| 24 | */ |
||
| 25 | public function register() |
||
| 26 | { |
||
| 27 | $this->app['apidoc.generate'] = $this->app->share(function () { |
||
| 28 | return new GenerateDocumentation(); |
||
| 29 | }); |
||
| 30 | $this->app['apidoc.update'] = $this->app->share(function () { |
||
| 31 | return new UpdateDocumentation(); |
||
| 32 | }); |
||
| 33 | |||
| 34 | $this->commands( |
||
| 35 | 'apidoc.generate', |
||
| 36 | 'apidoc.update', |
||
| 41 |