PHP code example of kmlaravel / apis-generator

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

    

kmlaravel / apis-generator example snippets

 
\KMLaravel\ApiGenerator\Facade\KMRoutesFacade::getRoutes();

    /*
    |--------------------------------------------------------------------------
    | package routes middleware
    |--------------------------------------------------------------------------
    |
    | this middleware array if you want to add custom middleware to package route,
    | this is applies to ( /apis-generator/index ) and ( /apis-generator/create ).
    |
    */
    //example
    "middleware" => [
        'admin',
    ],

    /*
    |--------------------------------------------------------------------------
    | types of the column in database which laravel provider.
    |--------------------------------------------------------------------------
    |
    | the options in database column select in creating a view,
    | you can add or optimize this column.
    |
    */
    "column_type" => [
        'text',
        'string',
        ...
    ],
shell
php artisan vendor:publish --provider="KMLaravel\ApiGenerator\Providers\ApisGeneratorServiceProviders"
shell
php artisan vendor:publish --tag=apis-generator-config
shell
php artisan vendor:publish --tag=apis-generator-asset