PHP Classes

File: config/routes.php

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Jaxon for CakePHP   config/routes.php   Download  
File: config/routes.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Jaxon for CakePHP
This package integrates the Jaxon library into the
Author: By
Last change: Update of config/routes.php
Date: 2 years ago
Size: 445 bytes
 

Contents

Class file image Download
<?php

use Cake\Routing\Router;

try
{
   
// This call throws an exception if the named route is not found.
   
$url = Router::url(['_name' => 'jaxon']);
}
catch(\
Exception $e)
{
   
// The route is added only if no route with the same name already exists.
   
Router::plugin('Jaxon/Cake', ['path' => '/jaxon'], function ($routes) {
       
$routes->connect('/', ['controller' => 'Jaxon', 'action' => 'index'], ['_name' => 'jaxon']);
    });
}