PHP code example of sitesoft / laravel-apis

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

    

sitesoft / laravel-apis example snippets


protected $middlewareGroups = [
    'web' => [
       // ...
    ],

    'api' => [
        // ...
        \Barryvdh\Cors\HandleCors::class,
    ],
];

$ php artisan vendor:publish --provider="Sitesoft\LaravelApis\ApisServiceProvider"

$ php artisan apis:create-project <name> <version> <url> --path=<path>

$ php artisan apis:create-project MyApi 1 http://test.com/api --path="Api/v1"

$ php artisan swaggen

$ php artisan apis:add-version <version> <url> --path=<path>