xunfei-wss/app/controller/IndexController.php
2023-09-16 18:17:16 +08:00

36 lines
704 B
PHP

<?php
namespace app\controller;
use app\extend\ChatGLM\Core;
use support\App;
use support\Request;
use Webman\Container;
use Workerman\Protocols\Websocket;
class IndexController
{
public function index(Request $request)
{
// $chat=(new Container())->get(Core::class);
(new Core())->getUrl();
static $readme;
if (!$readme) {
$readme = file_get_contents(base_path('README.md'));
}
return $readme;
}
public function view(Request $request)
{
return view('index/view', ['name' => 'webman']);
}
public function json(Request $request)
{
return json(['code' => 0, 'msg' => 'ok']);
}
}