PHP code example of treblle / treblle-lumen

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

    

treblle / treblle-lumen example snippets


$app->configure('treblle');

$app->routeMiddleware([
    'treblle' => Treblle\Middlewares\TreblleMiddleware::class
]);

$router->group(['prefix' => 'api', 'middleware' => 'treblle'], function () use ($router) {
    $router->get('users',  ['uses' => 'UserController@index']);
    $router->post('users',  ['uses' => 'TestController@store']);
});
bash
mkdir -p config
cp vendor/treblle/treblle-lumen/config/treblle.php config/treblle.php