Cartalyst\Sentinel\Cookies\IlluminateCookie::put PHP Method

put() public method

{@inheritDoc}
public put ( $value )
    public function put($value)
    {
        $cookie = $this->jar->forever($this->key, $value);
        $this->jar->queue($cookie);
    }

Usage Example

 public function testPut()
 {
     $cookie = new IlluminateCookie($request = m::mock('Illuminate\\Http\\Request'), $jar = m::mock('Illuminate\\Cookie\\CookieJar'), 'foo');
     $jar->shouldReceive('forever')->with('foo', 'bar')->once()->andReturn('cookie');
     $jar->shouldReceive('queue')->with('cookie')->once();
     $cookie->put('bar');
 }