/** * @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']); }
/** * @param string $name * @return VaultRoute */ public function createRoute($name) { $config = $this->config['route']; $route = new VaultRoute($name, $config['pattern'], $config['defaults']); return $route->withHost($config['matchHost'])->withMiddleware($config['middlewares']); }