Example #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);
 }