$params Route parameters (only used when path is a route name) */ public function __construct( public string $path, public array $params = [], ) { } /** * @param array $params Route parameters */ public static function create(string $path, array $params = []): self { return new self($path, $params); } }