PHP code example of hms5232 / laravel-swagger
1. Go to this page and download the library: Download hms5232/laravel-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/ */
hms5232 / laravel-swagger example snippets
use Hms5232\LaravelSwagger\LaravelSwaggerServiceProvider; // add this
class AppServiceProvider extends ServiceProvider
{
public function register()
{
// set condition
// for example, only register when env is "local"
if ($this->app->environment('local')) {
$this->app->register(LaravelSwaggerServiceProvider::class); // register laravel-swagger
}
}
}
shell
php artisan vendor:publish --provider "Hms5232\LaravelSwagger\LaravelSwaggerServiceProvider"
shell
composer dump-autoload