We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00ef35c commit 94c2a8bCopy full SHA for 94c2a8b
examples/sage/app/View/Composers/Navigation.php
@@ -17,28 +17,10 @@ class Navigation extends Composer
17
];
18
19
/**
20
- * Data to be passed to view before rendering.
21
- *
22
- * @return array
23
- */
24
- public function with()
25
- {
26
- return [
27
- 'navigation' => $this->navigation(),
28
- ];
29
- }
30
-
31
- /**
32
- * Returns the primary navigation.
33
34
+ * Retrieve the primary navigation menu.
35
*/
36
- public function navigation()
+ public function navigation(): array
37
{
38
- if (Navi::build()->isEmpty()) {
39
- return;
40
41
42
return Navi::build()->toArray();
43
}
44
0 commit comments