PHP code example of chhw / route-list

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

    

chhw / route-list example snippets




$router->get('/', function () use ($router) {
    return $router->app->version();
});

$router->get('minion', ["as" => "mini", 'uses' => 'ExampleController@mini']);

$router->group(['middleware' => ['ExampleMiddleware', 'Authenticate'], 'namespace' => 'YY', 'prefix' => 'DD', "as" => "admin"], function () use ($router) {
    $router->get('showVersion', function () use ($router) {
        return $router->app->version();
    });

});

$router->group(["as" => "test"], function () use ($router) {
    $router->get('vendor', ["as" => "vendor", "uses" => "\Test\Controllers\TestController@vendor"]);
});
bash
php artisan route:list