request->get($key, $default); } /** * Get input data * * @param string $key * @param mixed $default * @return mixed */ public function input($key, $default = null) { return $this->get($key, $default); } /** * Checks if the input exists * * @param string $key * @return bool */ public function has($key) { $value = $this->input($key); return !is_null($value); } /** * Get the requested path * * @return string */ public function path() { $pattern = trim($this->getPathInfo(), '/'); return $pattern == '' ? '/' : $pattern; } /** * Return the current URL * * @return string */ public function url() { return rtrim(preg_replace('/\?.*/', '', $this->getUri()), '/'); } }