Install.php 502 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2021 勾股工作室
  4. * @license https://opensource.org/licenses/Apache-2.0
  5. * @link https://www.gougucms.com
  6. */
  7. declare (strict_types = 1);
  8. namespace app\home\middleware;
  9. class Install
  10. {
  11. public function handle($request, \Closure $next)
  12. {
  13. if (!is_installed()) {
  14. return $request->isAjax() ? to_assign(1, '请先完成系统安装引导') : redirect((string) url('/install/index'));
  15. }
  16. return $next($request);
  17. }
  18. }