Add Link for simple API routing
parent
b7cbca03a7
commit
5e21877efc
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 6176303ac4e34fadaa393a4c06d169aef3fbb32e
|
@ -1,8 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
//define('IN_SCRIPT', 1);
|
||||||
|
//define('HESK_PATH', '../');
|
||||||
// Router: handles all REST requests to go to their proper place. Common dependency loading also happens here
|
// Router: handles all REST requests to go to their proper place. Common dependency loading also happens here
|
||||||
require_once(__DIR__ . '/core/common.php');
|
//require_once(__DIR__ . '/core/common.php');
|
||||||
|
require(__DIR__ . '/../Link/src/Link.php');
|
||||||
|
|
||||||
// Returns the URI (or everything after the domain
|
function routeMe(){
|
||||||
$uri = $_SERVER["REQUEST_URI"];
|
echo 'I am routed';
|
||||||
|
}
|
||||||
|
|
||||||
//
|
Link::all( array(
|
||||||
|
'/test' => 'routeMe',
|
||||||
|
));
|
Loading…
Reference in New Issue