PHP Classes

File: app/configs/components/router.php

Recommend this page to a friend!
  Classes of Oleg Lunegov   MicroPHP Framework   app/configs/components/router.php   Download  
File: app/configs/components/router.php
Role: Configuration script
Content type: text/plain
Description: setup router
Class: MicroPHP Framework
MVC framework for Web or command line applications
Author: By
Last change: Update of app/configs/components/router.php
Date: 9 months ago
Size: 389 bytes
 

Contents

Class file image Download
<?php

return [
   
'class' => '\Micro\Web\Router',
   
'arguments' => [
       
'routes' => [
           
'/login' => '/default/login',
           
'/logout' => '/default/logout',
           
'/login/<num:\d+>/<type:\w+>/<arr:\d{3}>' => '/default/login',
           
'/blog/post/index/<page:\d+>' => '/blog/post',
           
'/blog/post/<id:\d+>' => '/blog/post/view'
       
]
    ]
];