Skip to content

Simplesmente/syroute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP SyRoute class

Simple Router for methods GET and POST.

This class handle all requests coming from Verbs GET and POST

Author

Easy to install with composer

$ not yet published

Usage

<?php
require __DIR__.'/src/Route/SyRoute.php';
 

$route = new Simply\Route\SyRoute;

## Use without params

$route->addRoute('/','App\Controller\ExampleController@index');

## Use params type Strings

$route->addRoute('/post/(\w+)','App\Controller\HomeController@home');

## Use params type Integer

$route->addRoute('/post/(\d+)','App\Controller\HomeController@home');

$route->dispath(); // Run all requests from the URI 



License

MIT Licensed, http://www.opensource.org/licenses/MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages