1. Go to this page and download the library: Download fitv/l5-swagger-ui 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/ */
fitv / l5-swagger-ui example snippets
return [
/*
* Title of the documentation page.
*/
'title' => 'Laravel Swagger UI',
/*
* Layout of the Swagger UI.
*/
'layout' => 'StandaloneLayout',
/*
* Route of the documentation page.
*/
'route' => '/api-docs',
/*
* Middleware allows to prevent unexpected access to the documentation page.
*/
'middleware' => [],
/*
* Path of the documentation files.
*/
'docs_path' => storage_path('docs'),
/*
* Filename of the json/yaml documentation.
*/
'doc_filename' => 'api.yml',
/*
* Path of the asset files.
*/
'assets_path' => '/vendor/l5-swagger-ui',
];