File: routes/routes.php

Recommend this page to a friend!
  Classes of Luis Toscano  >  Speed-Belt PHP Routing Class  >  routes/routes.php  >  Download  
File: routes/routes.php
Role: Configuration script
Content type: text/plain
Description: Configuration script
Class: Speed-Belt PHP Routing Class
Route the handling of HTTP requests to classes
Author: By
Last change:
Date: 2 months ago
Size: 617 bytes
 

Contents

Class file image Download
<?php

// This is a examples for using routings

$routes = [
       
'/' => [
               
'http' => 'GET',
               
'action'=> function ($utils){

                }
        ],
       
'/categoria/?' => [
               
'http' => 'GET',
               
'action'=> function ($slug, $res){

                 }
        ],
       
'/cart' => [
               
'http' => 'GET',
               
'action'=> '@models/test/index'
       
],
       
'/confirmation' => [
               
'http' => 'POST',
               
'action'=> '@models/test/api'
       
]
];


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