Guard.php 558 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. * This file is part of the overtrue/wechat.
  4. *
  5. * (c) overtrue <i@overtrue.me>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace EasyWeChat\OfficialAccount\Server;
  11. use EasyWeChat\Kernel\ServerGuard;
  12. /**
  13. * Class Guard.
  14. *
  15. * @author overtrue <i@overtrue.me>
  16. */
  17. class Guard extends ServerGuard
  18. {
  19. /**
  20. * @return bool
  21. */
  22. protected function shouldReturnRawResponse(): bool
  23. {
  24. return !is_null($this->app['request']->get('echostr'));
  25. }
  26. }