Skip to content

Commit

Permalink
feat: add make convenience method
Browse files Browse the repository at this point in the history
  • Loading branch information
innocenzi committed Jun 10, 2022
1 parent 7024953 commit 03fc20c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public function __construct(ActiveUrlChecker $activeUrlChecker)
$this->children = [];
}

public static function make(): static
{
return app(static::class);
}

public function add(string $title = '', string $url = '', ?callable $configure = null): self
{
$section = new Section($this, $title, $url);
Expand Down

0 comments on commit 03fc20c

Please sign in to comment.