예제 #1
0
 public function validateToken()
 {
     $sToken = Session::get('__formtoken');
     $fToken = Input::post('_token');
     if ($fToken) {
         if ($fToken == $sToken) {
             return true;
         }
     }
     $this->passed = false;
     $this->errors['_token'] = $this->getErrorMessage('tokenMismatch');
     Session::remove('__formtoken');
 }
예제 #2
0
 public function pagelink($number)
 {
     $active = (Input::get('page') ?: 1) == $number ? 'class="active"' : '';
     $link = url(URL::getInstance()->uri(), array_merge(URL::getInstance()->inputs(), ['page' => $number]));
     return "<li><a href=\"{$link}\" {$active}>{$number}</a></li>";
 }