當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CookieJar::make方法代碼示例

本文整理匯總了PHP中Illuminate\Cookie\CookieJar::make方法的典型用法代碼示例。如果您正苦於以下問題:PHP CookieJar::make方法的具體用法?PHP CookieJar::make怎麽用?PHP CookieJar::make使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Cookie\CookieJar的用法示例。


在下文中一共展示了CookieJar::make方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setCookie

 /**
  * Set the cookies
  *
  * @return $this
  */
 protected function setCookie($remember_me = false)
 {
     if (config('laravel-avp.cookie_age') == 'forever') {
         // Set a forever cookie saying the user is old enough
         $cookie = $this->cookie->forever(config('laravel-avp.cookie_name'), config('laravel-avp.cookie_val'));
     } elseif ($remember_me) {
         // Remember for 30 days
         $cookie = $this->cookie->make(config('laravel-avp.cookie_name'), config('laravel-avp.cookie_val'), 60 * 24 * 30);
     } elseif (is_int(config('laravel-avp.cookie_age'))) {
         // Sets a cookie lasting X minutes saying the user is old enough
         $cookie = $this->cookie->make(config('laravel-avp.cookie_name'), config('laravel-avp.cookie_val'), config('laravel-avp.cookie_age'));
     } else {
         // Sets a session cookie saying the user is old enough
         $cookie = $this->cookie->make(config('laravel-avp.cookie_name'), config('laravel-avp.cookie_val'));
     }
     return redirect()->intended('/')->withCookie($cookie);
 }
開發者ID:fastwebmedia,項目名稱:laravel-avp,代碼行數:22,代碼來源:Validation.php

示例2: make

 /**
  * Create a new cookie instance.
  *
  * @param string $name
  * @param string $value
  * @param int $minutes
  * @param string $path
  * @param string $domain
  * @param bool $secure
  * @param bool $httpOnly
  * @return \Symfony\Component\HttpFoundation\Cookie 
  * @static 
  */
 public static function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true)
 {
     return \Illuminate\Cookie\CookieJar::make($name, $value, $minutes, $path, $domain, $secure, $httpOnly);
 }
開發者ID:satriashp,項目名稱:tour,代碼行數:17,代碼來源:_ide_helper.php

示例3: put

 /**
  * Put a value in the Sentry cookie.
  *
  * @param  mixed  $value
  * @param  int    $minutes
  * @return void
  */
 public function put($value, $minutes)
 {
     $cookie = $this->jar->make($this->getKey(), $value, $minutes);
     $this->jar->queue($cookie);
 }
開發者ID:peintune,項目名稱:Ternado,代碼行數:12,代碼來源:IlluminateCookie.php

示例4: getCookie

 /**
  * Write the session cookie to the response.
  *
  * @param  Illuminate\Cookie\CookieJar  $cookie
  * @param  string  $name
  * @param  int  $lifetime
  * @return void
  */
 public function getCookie(CookieJar $cookie, $name, $lifetime)
 {
     return $cookie->make($name, $this->getSessionId(), $lifetime);
 }
開發者ID:defra91,項目名稱:levecchiecredenze.it,代碼行數:12,代碼來源:Store.php

示例5: write

 /**
  * {@inheritDoc}
  */
 public function write($sessionId, $data)
 {
     $this->setCookie($this->cookie->make($sessionId, $data, $this->minutes));
 }
開發者ID:Thomvh,項目名稱:turbine,代碼行數:7,代碼來源:CookieSessionHandler.php


注:本文中的Illuminate\Cookie\CookieJar::make方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。