diff --git a/api/index.php b/api/index.php index dfcb9e63..ca5719ef 100644 --- a/api/index.php +++ b/api/index.php @@ -5,10 +5,26 @@ //require_once(__DIR__ . '/core/common.php'); require(__DIR__ . '/../Link/src/Link.php'); -function routeMe(){ - echo 'I am routed'; +class HomeController +{ + + 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( - '/test' => 'routeMe', +Link::all(array( + '/test/{i}' => 'HomeController', )); \ No newline at end of file