コード例 #1
0
 /**
  * Configure Javascript remote validations.
  *
  * @param Validator $validator
  */
 protected function configureJsRemote(Validator $validator)
 {
     if (is_null($this->sessionStore)) {
         return;
     }
     $token = $this->sessionStore->token();
     if (!is_null($this->container['encrypter'])) {
         $token = $this->container['encrypter']->encrypt($token);
     }
     $validator->setRemoteToken($token);
     $validator->enableRemote($this->jsRemoteEnabled);
 }
コード例 #2
0
ファイル: _ide_helper.php プロジェクト: satriashp/tour
 /**
  * Get the CSRF token value.
  *
  * @return string 
  * @static 
  */
 public static function token()
 {
     return \Illuminate\Session\Store::token();
 }