How do I replace ‘My awesome format’ in the sample below (from the docs) with the twig->render? How can I bring container in? I’m trying to render custom error pages in my app using twig
<?php
use Slim\Interfaces\ErrorRendererInterface;
use Throwable;
class MyCustomErrorRenderer implements ErrorRendererInterface
{
public function __invoke(Throwable $exception, bool $displayErrorDetails): string
{
return 'My awesome format';
}
}