/**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app['cookie'] = $this->app->share(function ($app) {
         $cookies = new CookieJar($app['request'], $app['encrypter']);
         $config = $app['config']['session'];
         return $cookies->setDefaultPathAndDomain($config['path'], $config['domain']);
     });
 }
示例#2
0
 /**
  * Set the default path and domain for the jar.
  *
  * @param string $path
  * @param string $domain
  * @param bool $secure
  * @return $this 
  * @static 
  */
 public static function setDefaultPathAndDomain($path, $domain, $secure = false)
 {
     return \Illuminate\Cookie\CookieJar::setDefaultPathAndDomain($path, $domain, $secure);
 }