31 lines
516 B
PHP
31 lines
516 B
PHP
|
<?php
|
||
|
|
||
|
namespace app\controller;
|
||
|
|
||
|
use support\Request;
|
||
|
use think\facade\Db;
|
||
|
|
||
|
class IndexController
|
||
|
{
|
||
|
protected $noNeedLogin = ['json'];
|
||
|
public function index(Request $request)
|
||
|
{
|
||
|
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)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|