PHP code example of mymdz / l5-swagger

1. Go to this page and download the library: Download mymdz/l5-swagger library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mymdz / l5-swagger example snippets


$this->app->register(\L5Swagger\L5SwaggerServiceProvider::class);

L5Swagger\L5SwaggerServiceProvider::class,

'swagger_version' => env('SWAGGER_VERSION', '2.0'),

'api' => [
  \App\Http\Middleware\EncryptCookies::class,
  \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
  \Illuminate\Session\Middleware\StartSession::class,
  \Illuminate\View\Middleware\ShareErrorsFromSession::class,
  \App\Http\Middleware\VerifyCsrfToken::class,
  \Illuminate\Routing\Middleware\SubstituteBindings::class,
  \Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
  'auth',
]
bash
$ php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"
bash
composer 
bash
$ php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"