diff --git a/examples/sage/app/View/Composers/Navigation.php b/examples/sage/app/View/Composers/Navigation.php index 3d3f437..290249a 100644 --- a/examples/sage/app/View/Composers/Navigation.php +++ b/examples/sage/app/View/Composers/Navigation.php @@ -17,28 +17,10 @@ class Navigation extends Composer ]; /** - * Data to be passed to view before rendering. - * - * @return array - */ - public function with() - { - return [ - 'navigation' => $this->navigation(), - ]; - } - - /** - * Returns the primary navigation. - * - * @return array + * Retrieve the primary navigation menu. */ - public function navigation() + public function navigation(): array { - if (Navi::build()->isEmpty()) { - return; - } - return Navi::build()->toArray(); } }