Skip to content

Commit

Permalink
Add get method to cookie facade.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 28, 2013
1 parent b1334d1 commit 58ec2fe
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Illuminate/Support/Facades/Cookie.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@


class Cookie extends Facade { class Cookie extends Facade {


/**
* Retrieve a cookie from the request.
*
* @param string $key
* @param mixed $default
* @return string
*/
public static function get($key = null, $default = null)
{
return static::$app['request']->cookie($key, $default);
}

/** /**
* Get the registered name of the component. * Get the registered name of the component.
* *
Expand Down

0 comments on commit 58ec2fe

Please sign in to comment.