Skip to content

[3.x] Add a single Hyde::registerPage($page) API #2535

Description

@emmadesilva

Add a single Hyde::registerPage($page) API

Registering a page after kernel boot currently requires two coordinated calls:

Hyde::pages()->addPage($page);
Hyde::routes()->addRoute(new Route($page));

Add a convenience API such as:

Hyde::registerPage($page);

It should register both the page and its route, reducing boilerplate and preventing pages from being added without a corresponding route.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions