mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-03 05:41:38 +08:00
改进Cookie类的get方法支持获取全部 改进Request类的cookie方法
This commit is contained in:
@@ -802,10 +802,12 @@ class Request
|
||||
public function cookie($name = '', $default = null, $filter = '')
|
||||
{
|
||||
if (empty($this->cookie)) {
|
||||
$this->cookie = $_COOKIE;
|
||||
$this->cookie = Cookie::get();
|
||||
}
|
||||
if (is_array($name)) {
|
||||
return $this->cookie = array_merge($this->cookie, $name);
|
||||
} elseif (!empty($name)) {
|
||||
$name = Cookie::prefix() . $name;
|
||||
}
|
||||
return $this->input($this->cookie, $name, $default, $filter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user