/** * Get array of URL parameters * * @return array */ public function params() { preg_match($this->route->toRegexp(), $this->url()->path(), $matches); array_shift($matches); return array_combine($this->route->getKeys(), $matches); }