您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

25 行
771B

  1. <?php
  2. namespace Lc\SovBundle\Controller;
  3. use Throwable;
  4. use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
  5. class ErrorController extends AbstractController
  6. {
  7. public function show(Throwable $exception, DebugLoggerInterface $logger = null)
  8. {
  9. if (str_contains($this->getRequestStack()->getCurrentRequest(), "/admin")) {
  10. return $this->render('@LcSov/exception/error.html.twig', [
  11. "code" => $exception->getCode(),
  12. "message" => $exception->getMessage()
  13. ]);
  14. } else {
  15. return $this->render('bundles/TwigBundle/Exception/error.html.twig', [
  16. "code" => $exception->getCode(),
  17. "message" => $exception->getMessage()
  18. ]);
  19. }
  20. }
  21. }