Files
EasyAdmin8/app/index/controller/Index.php
wolfcode af275e1c6a fix(install): check for .env file existence before installation
- Add a check for the presence of the .env file in the root directory
- Update the index method to redirect to the admin page with a default value

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
2024-10-23 10:27:06 +08:00

19 lines
374 B
PHP

<?php
namespace app\index\controller;
use app\BaseController;
use think\facade\Env;
use think\response\Redirect;
class Index extends BaseController
{
/**
* @return Redirect
*/
public function index(): Redirect
{
// 这是项目首页 系统默认跳转后台页面
return redirect('/' . Env::get('EASYADMIN.ADMIN', 'admin'));
}
}