feat: 添加index应用模块
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\home\controller;
|
||||
|
||||
class Index
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return '您好!这是一个[home]示例应用';
|
||||
}
|
||||
}
|
||||
12
app/index/controller/Index.php
Normal file
12
app/index/controller/Index.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\index\controller;
|
||||
|
||||
class Index
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return '您好!这是一个[' . lang('home') . ']示例应用';
|
||||
}
|
||||
}
|
||||
5
app/index/lang/en-us.php
Normal file
5
app/index/lang/en-us.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'home' => 'Home',
|
||||
];
|
||||
5
app/index/lang/zh-cn.php
Normal file
5
app/index/lang/zh-cn.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'home' => '首页',
|
||||
];
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
// 这是系统自动生成的middleware定义文件
|
||||
return [
|
||||
|
||||
// 启用多语言支持
|
||||
'think\middleware\LoadLangPack',
|
||||
];
|
||||
13
app/index/route/v1.php
Normal file
13
app/index/route/v1.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
use think\facade\Route;
|
||||
|
||||
Route::get('/', 'Index/index');
|
||||
Reference in New Issue
Block a user