예제 #1
0
파일: Paginator.php 프로젝트: Yatko/Gifteng
 /**
  * Get a URL for a given page number.
  *
  * @param  int     $page
  * @return string
  */
 public function getUrl($page)
 {
     $parameters = array($this->env->getPageName() => $page);
     // If we have any extra query string key / value pairs that need to be added
     // onto the URL, we will put them in query string form and then attach it
     // to the URL. This allows for extra information like sortings storage.
     if (count($this->query) > 0) {
         $parameters = array_merge($parameters, $this->query);
     }
     return $this->env->getCurrentUrl() . '?' . http_build_query($parameters, null, '&');
 }
예제 #2
0
 /**
  * Get the input page parameter name used by the paginator.
  *
  * @return string 
  * @static 
  */
 public static function getPageName()
 {
     return \Illuminate\Pagination\Environment::getPageName();
 }