I'm testing a web application, but I need to implement the use of routing and I found it better to work with Respect \ rest. I followed all the instructions for using the class, but I can not print if I want a Hello world on the screen, what is wrong?
Index.php file
use Respect\Rest\Router;
chdir( __DIR__ . '/..');
require 'vendor/autoload.php';
$router = new Router();
$router->get('/','Hello World');
I made the installation of class Respect \ Rest via composer, but I've been testing for a long time nothing happens.
Here is my composer.json
{
"autoload": {
"psr-4": {
"App\": "src/App"
}
},
"require": {
"respect/rest": "^0.6.0"
}
}