More routing changes
This commit is contained in:
parent
5e21877efc
commit
d9000c12c7
@ -5,10 +5,26 @@
|
|||||||
//require_once(__DIR__ . '/core/common.php');
|
//require_once(__DIR__ . '/core/common.php');
|
||||||
require(__DIR__ . '/../Link/src/Link.php');
|
require(__DIR__ . '/../Link/src/Link.php');
|
||||||
|
|
||||||
function routeMe(){
|
class HomeController
|
||||||
echo 'I am routed';
|
{
|
||||||
|
|
||||||
|
function get($i){
|
||||||
|
echo 'You have got to home :) Val:' . intval($i);
|
||||||
|
}
|
||||||
|
|
||||||
|
function post(){
|
||||||
|
echo 'You have posted to home';
|
||||||
|
}
|
||||||
|
|
||||||
|
function put(){
|
||||||
|
echo 'You have put to home';
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete(){
|
||||||
|
echo 'You have deleted the home :(';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Link::all( array(
|
Link::all(array(
|
||||||
'/test' => 'routeMe',
|
'/test/{i}' => 'HomeController',
|
||||||
));
|
));
|
||||||
Loading…
x
Reference in New Issue
Block a user