/** * @param string $name * @return VaultRoute */ public function createRoute($name) { $route = new VaultRoute($name, $this->config['route']['pattern'], $this->config['route']['defaults']); if ($this->config['route']['matchHost']) { $route->matchHost(true); } return $route->middleware($this->config['route']['middlewares']); }