mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Request类
This commit is contained in:
12
helper.php
12
helper.php
@@ -22,6 +22,7 @@ use think\Input;
|
||||
use think\Lang;
|
||||
use think\Loader;
|
||||
use think\Log;
|
||||
use think\Request;
|
||||
use think\Route;
|
||||
use think\Session;
|
||||
use think\Url;
|
||||
@@ -358,3 +359,14 @@ function route($rule = '', $route = [], $type = '*', $option = [], $pattern = []
|
||||
{
|
||||
Route::register($rule, $route, $type, $option, $pattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Request参数
|
||||
* @param string $name 方法
|
||||
* @param mixed $param 参数
|
||||
* @return mixed
|
||||
*/
|
||||
function request($name, $param = '')
|
||||
{
|
||||
return Request::instance()->$name($param);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user