1. Go to this page and download the library: Download rafoabbas/api-docs 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/ */
rafoabbas / api-docs example snippets
use ApiDocs\Attributes\ApiFolder;
use ApiDocs\Attributes\ApiRequest;
#[ApiFolder('V1 / Auth')]
class AuthController extends Controller
{
#[ApiRequest(name: 'Login', description: 'Authenticate user')]
public function login(LoginRequest $request): JsonResponse
{
// ...
}
}