30 lines
524 B
PHP
30 lines
524 B
PHP
<?php
|
|
|
|
namespace app\controller;
|
|
|
|
use app\BaseController;
|
|
use think\facade\Config;
|
|
use think\response\Json;
|
|
|
|
class Index extends BaseController
|
|
{
|
|
public function index()
|
|
{
|
|
return Json::create([
|
|
"code" => 0,
|
|
"message" => "running"
|
|
]);
|
|
}
|
|
public function test($name = 'ThinkPHP6')
|
|
{
|
|
return \json(
|
|
Config::get("app.evaluation.subject")
|
|
);
|
|
}
|
|
|
|
public function hello($name = 'ThinkPHP6')
|
|
{
|
|
return 'hello,' . $name;
|
|
}
|
|
}
|