1. Go to this page and download the library: Download nextapps/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/ */
nextapps / 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, [
//
]);
});
}