Epiphany framework redirects to homepage

238 views Asked by At

Hello so I've started using epiphany microframework and is having simple problem. I followed the docs but I can't get the route to work. Here is my code:

include_once 'src/Epi.php';
Epi::init('route');
getRoute()->get('/', 'home');
getRoute()->get('/contact', 'contactUs');
getRoute()->run();

function home() {
    echo 'You are at the home page';
}

function contactUs() {
    echo 'Send us an email at <a href="mailto:[email protected]">[email protected]</a>';
}

and running it on terminal with php -S localhost:8080. Whenever I enter localhost:8080 it echos out 'You are at the home page'. But when I do localhost:8080/contact it still echos out 'You are at the home page'. I've followed everything in the docs. Am I doing something wrong?

0

There are 0 answers