PHP code example of calen / router

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

    

calen / router example snippets

 php artisan vendor:publish 

return [
    'middlewares' => [
        // 'test' => App\WS\AuthMiddleware::class,
    ],
    'routes' => function ($routes) {
        $routes->group(['namespace' => 'App\Http\Controllers'], function ($routes) {
            $routes->route('/', 'HomeController@index');
        });
    },
];


$routes->group(
    [
        'namespace' => 'App\Http\Controllers',
        'middleware' => 'dummy',
        'prefix' => 'CalenApp',
    ], function ($routes) {
        // My routes
    });

 return [
     'middlewares' => [
         'dummy' => App\WS\Dummyddleware::class,
     ],
     'routes' => function ($routes) {
         $routes->group(['namespace' => 'App\Http\Controllers'], function ($routes) {
             $routes->route('/', 'HomeController@index');
         });
     },
 ];