- 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>
19 lines
374 B
PHP
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'));
|
|
}
|
|
} |