示例#1
0
文件: Form.php 项目: icehawk/forms
 public function guardTokenIsValid(IdentifiesFormRequestSource $token)
 {
     if (!$this->token->equals($token)) {
         throw (new TokenMismatch())->withTokens($this->token, $token);
     }
     if ($this->token->isExpired()) {
         throw new TokenHasExpired();
     }
 }