Seditio Source
Root |
./othercms/croogo-4.0.7/vendor/friendsofcake/crud-json-api/tests/config/routes.php
<?php
namespace CrudJsonApi\Test\App\Config;

use
Cake\Core\Configure;
use
Cake\Core\Plugin;
use
Cake\Routing\RouteBuilder;
use
Cake\Routing\Router;

Router::scope('/', function ($routes) {
   
$routes->setExtensions(['json']);

   
$routes->connect('/:controller', ['action' => 'index'], ['routeClass' => 'InflectedRoute']);
   
$routes->connect('/:controller/:action/*', [], ['routeClass' => 'InflectedRoute']);

   
$routes->resources('Countries', function (RouteBuilder $routes) {
       
$routes->connect(
           
'/relationships/:type',
            [
               
'controller' => 'Currencies',
               
'_method' => 'GET',
               
'action' => 'view',
               
'from' => 'Countries',
            ]
        );

        return
$routes;
    });
   
$routes->resources('Currencies');
   
$routes->resources('Cultures');
});