I want to use group routing in Slim 3 Framework, but I always get "Object not found! The requested URL was not found on this server". I am not sure what I did wrong. Here's the code I wrote:
<?php
require "vendor/autoload.php";
$app = new \Slim\App();
// API Version Group
$app->group("/v1", function() use($app) {
$app->get("/test1", function() use($app){
return "from v1 tes1";
});
});
//Run the app
$app->run();
?>
I ran this locally like : http://localhost/MyAPI/v1/test1
. Can anyone help me?
Thanks