Skip to content

Commit 12925d3

Browse files
committed
Update constructor to use the same logic as the static create method
1 parent 3bcafeb commit 12925d3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/framework/src/Framework/Features/Navigation/NavigationItem.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ class NavigationItem implements Stringable
2323

2424
public function __construct(Route|string $destination, string $label, int $priority = NavigationMenu::DEFAULT)
2525
{
26-
$this->label = $label;
27-
$this->priority = $priority;
28-
$this->destination = $destination;
26+
[$this->destination, $this->label, $this->priority] = self::make($destination, $label, $priority);
2927
}
3028

3129
/**

0 commit comments

Comments
 (0)