HighSpeaker/app/controller/IndexController.php
2024-02-05 00:00:23 +08:00

35 lines
823 B
PHP

<?php
namespace app\controller;
use support\Request;
use support\Redis;
use support\View;
class IndexController
{
public function index(Request $request)
{
View::assign('userinfo', $request->session()->get('userinfo'));
return view('index');
}
public function user(Request $request)
{
$redis = Redis::connection('default');
$user=$redis->hgetall('User');
View::assign('user', $user);
View::assign('userinfo', $request->session()->get('userinfo'));
return view('user');
}
public function domain(Request $request)
{
View::assign('userinfo', $request->session()->get('userinfo'));
return view('domain');
}
public function json(Request $request)
{
return json(['code' => 0, 'msg' => 'ok']);
}
}