init: 项目初始代码
This commit is contained in:
18
route/app.php
Normal file
18
route/app.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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;
|
||||
|
||||
return [
|
||||
//全局错误路由
|
||||
Route::miss(function(){
|
||||
return json(["status"=>504,'message'=>'不支持直接请求,请使用正确的接口地址和参数','route'=>request()->url(),'create_time'=>time(),'date_time'=>date("Y-m-d H:i:s",time())]);
|
||||
})
|
||||
];
|
||||
Reference in New Issue
Block a user