tweaking has methods.

This commit is contained in:
Taylor Otwell
2011-06-16 22:45:33 -05:00
parent 73d8e2f2fa
commit 5c275db6f4
4 changed files with 23 additions and 38 deletions

View File

@@ -95,7 +95,7 @@ class Cookie {
*/
public static function has($name)
{
return ! is_null(static::get($key));
return ! is_null(static::get($name));
}
/**
@@ -107,7 +107,7 @@ class Cookie {
*/
public static function get($name, $default = null)
{
return (array_key_exists($name, $_COOKIE)) ? $_COOKIE[$name] : $default;
return Arr::get($_COOKIE, $name, $default);
}
/**