Skip to content

abdelrahman-hamdy/Mowajjeh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mowajjeh

simple PHP router

الاستخدام

<?php

include "Mowajjeh.class.php";
$mow = new Mowajjeh();

# callback
$mow->get("/hello/:user",['user'=>"[a-z]*"],function($user){
	echo "Hello I'm {$user}";
});

# include File , all vars will pass to the file.
$mow->get("/hello/:user",['user'=>"[a-z]*"],__DIR__."example.php");

# post
$mow->post("/api/get_data/:type",['type'=>"[a-z]*"],function($type){
	return $type;
});

About

simple PHP router

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published