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:
Date: 4 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']);
    });
}


For more information send a message to info at phpclasses dot org.