/** * Render the url order. * * @param string $column * @param string $alias * @return string */ public function url($column = null) { if (is_null($column)) { throw new \Exception('Column is null'); } return $this->path . '?' . http_build_query(array_merge(Input::query(), ['by' => $column, 'order' => Input::get('order') == 'desc' ? 'asc' : 'desc'])); }
public function __construct(PhpEngine $engine) { $this->storage = storage_path() . '/views'; if (count(Input::query()) > 0) { $input = http_build_query(Input::query()); } else { $input = NULL; } $this->engine = $engine; $segments = Request::segments(); if (count($segments) > 0) { $segments = implode('.', $segments); } else { $segments = ""; } $this->filename = $this->pfx . md5(\URL::to('/') . $segments . '?' . $input); }
/** * Rebuild the current url query string for the pagination links * * @return array */ protected function buildUrlQuery() { $query = array_map(function ($value) { return is_string($value) ? urlencode($value) : $value; }, Input::query()); // Remove 'own' page query element if (isset($query['page'])) { unset($query['page']); } return $query; }