/** * 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, '&'); }
/** * Get the root URL for the request. * * @return string * @static */ public static function getCurrentUrl() { return \Illuminate\Pagination\Environment::getCurrentUrl(); }