public function prefix(string $prefix) { $prefix = trim($prefix, "/"); if ($prefix != "") { foreach ($this->routes as &$route) { $route[1] = "/{$prefix}{$route['1']}"; } $this->actions = []; } return $this; }