composer require "darkaonline/l5-swagger"
php artisan l5-swagger:generate
php artisan vendor:publish --provider "L5SwaggerL5SwaggerServiceProvider"
// Full Example
/**
* @OAGet(
* path="/projects",
* operationId="getProjectsList",
* tags={"Projects"},
* summary="Get list of projects",
* description="Returns list of projects",
* @OAResponse(
* response=200,
* description="Successful operation",
* @OAJsonContent(ref="#/components/schemas/ProjectResource")
* ),
* @OAResponse(
* response=401,
* description="Unauthenticated",
* ),
* @OAResponse(
* response=403,
* description="Forbidden"
* )
* )
*/
// Helpful environment variables
L5_SWAGGER_GENERATE_ALWAYS=true
L5_SWAGGER_CONST_HOST=https://example.com