22 lines
494 B
PHP
22 lines
494 B
PHP
<?php
|
|
/**
|
|
* @copyright Copyright (c) 2021 勾股工作室
|
|
* @license https://opensource.org/licenses/GPL-2.0
|
|
* @link https://www.gougucms.com
|
|
*/
|
|
|
|
declare (strict_types = 1);
|
|
|
|
namespace app\admin\middleware;
|
|
|
|
class Install
|
|
{
|
|
public function handle($request, \Closure $next)
|
|
{
|
|
if (!is_installed()) {
|
|
return $request->isAjax()?to_assign(0,'请先完成系统安装引导'):redirect((string)url('/install/index'));
|
|
}
|
|
return $next($request);
|
|
}
|
|
}
|