PHP code example of hawasly / laravel-apidog

1. Go to this page and download the library: Download hawasly/laravel-apidog 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/ */

    

hawasly / laravel-apidog example snippets


'examples' => ['phone' => '0912345678'],

'POST /admin/students' => [
    'name' => '',
    'summary' => '',
    'notes' => '',
],

'roles' => [
    'Guest'   => ['*/login', '*/register', '*/public/*'],
    'Admin'   => ['*/admin/*', 'admin.*'],
    'Student' => ['*/user/*', 'user.*'],
],
'output' => 'docs/api',
'prefix' => 'api',
bash
php artisan api:spec --describe
bash
php artisan api:spec                      # الصيغتان
php artisan api:spec --format=openapi     # Apidog وحده
php artisan api:spec --format=postman
php artisan api:spec --prefix=api/admin
php artisan api:spec --output=storage/app/api
php artisan api:spec --describe
bash
php artisan vendor:publish --tag=api-spec-config