1. Go to this page and download the library: Download wotz/laravel-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/ */
wotz / laravel-swagger-ui example snippets
/**
* Register the Swagger UI gate.
*
* This gate determines who can access Swagger UI in non-local environments.
*
* @return void
*/
protected function gate()
{
Gate::define('viewSwaggerUI', function ($user = null) {
return in_array(optional($user)->email, [
//
]);
});
}