1
815979670 2019-06-08 10:36:53 +08:00 via Android
用构造函数
|
2
strcmp 2019-06-08 11:06:57 +08:00
request()
|
3
mamahaha 2019-06-08 14:59:58 +08:00
请求对象为模型字段,use 模型类
|
4
yeeling 2019-06-09 14:14:20 +08:00
```
if (! function_exists('request')) { /** * Get an instance of the current request or an input item from the request. * * @param string $key * @param mixed $default * @return \Illuminate\Http\Request|string|array */ function request($key = null, $default = null) { if (is_null($key)) { return app('request'); } return app('request')->input($key, $default); } } ``` |