How do I make default route '/topic'?

Well … every one.

I have some one qustion about route function of Slim Framework

What is Best way about ‘/topic’ route for default route set up ‘/’ ?

I tried

$app->get(’/’, function (Request $request, Response $response) {
return $response->withRedirect(’/topic’);"
});

but it’s remain like tail http://example.com/topic

How Do I any solve by ‘what’ function looks like for clean “http://example.com/” ??

Hello pugcs,

I don’t quite understand your question. Perhaps you can clarify some more?

I assume you have an existing route for /topic? E.g.

$app->get('/topic', function (Request $request, Response $response) {
    return $this->view->render($response, 'topic.html');
})

And you are looking for a way to show the same content on the front page?