mirror of
https://github.com/laravel/laravel.git
synced 2025-02-20 11:53:14 +08:00
Added ability to pass multiple parameters to Cookie::has.
This commit is contained in:
parent
55eb2ecb08
commit
65dca24939
@ -83,14 +83,21 @@ class Cookie {
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a cookie exists.
|
||||
* Determine if a cookie or set of cookies exists.
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public static function has($name)
|
||||
public static function has()
|
||||
{
|
||||
return ( ! is_null(static::get($name)));
|
||||
foreach (func_get_args() as $key)
|
||||
{
|
||||
if (is_null(static::get($key)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user