Skip to content

Kirolos-Nabil-0/alpha_router-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Ⲁ_router

Ⲁ(alpha) router is an open source PHP routing library that provides high security routing (Dont worry about XSS || CSRF )

How to use ?

  1. Download the files
  2. in the file that you write in the whole routes require_once __DIR__.'/a_router.php';
  3. Create object from the class Router
  4. start using the method to Route evrey thing

simple explainig :

  1. We Have 5 methods :
  • get()--> for get requests
  • post()-->for post requests
  • delete()-->for delete requests
  • patch()-->for patch requests
  • any()-->for any kind of requests

exampels:

require_once __DIR__.'/a_router.php';

Static GET Routing

$router = new Router; $router->get('/','/views/index') ;

Dynamic GET Routing

$router = new Router; $router->get('/User/$name/','/views/mens') ;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages