Skip to content

Commit 2ac90f4

Browse files
committed
Support Laravel 5.2
1 parent 9d57c35 commit 2ac90f4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Activators/NavActivator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function checkActive(Nav $nav)
3232

3333
public function hasActive(NavCollection $menu)
3434
{
35-
return $menu->getItems()->first(function (Nav $nav) {
35+
return false !== $menu->getItems()->search(function (Nav $nav) {
3636
return $this->checkActive($nav);
3737
});
3838
}

src/NavCollection.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@ protected function filterNav(Nav $nav, callable $callback)
160160
return $callback($nav);
161161
}
162162

163-
public function isEmpty()
163+
public function isNotEmpty()
164164
{
165-
return $this->items->isEmpty();
165+
return !$this->isEmpty();
166166
}
167167

168-
public function isNotEmpty()
168+
public function isEmpty()
169169
{
170-
return $this->items->isNotEmpty();
170+
return $this->items->isEmpty();
171171
}
172172

173173
public function getItems()

0 commit comments

Comments
 (0)