Hi, I’m new to Slim Framework. I’m not sure how to render a specific template for 404 Not found.
I’m handling the error as in the documentation: https://www.slimframework.com/docs/handlers/not-found.html
$c['notFoundHandler'] = function ($c) {
return function ($request, $response) use ($c) {
return $c['response']
->withStatus(404)
->withHeader('Content-Type', 'text/html')
->write('Page not found');
};
};
Thanks