From b51a6148d983662fdc8f54f22320993a2867b82a Mon Sep 17 00:00:00 2001 From: Micheal Mand Date: Thu, 17 Dec 2015 14:06:19 -0600 Subject: [PATCH] Fix submenu items not having their target attribute set. Signed-off-by: Micheal Mand --- Providers/MenuServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Providers/MenuServiceProvider.php b/Providers/MenuServiceProvider.php index e951365..cd05c32 100644 --- a/Providers/MenuServiceProvider.php +++ b/Providers/MenuServiceProvider.php @@ -89,7 +89,7 @@ function () { public function addItemToMenu(Menuitem $item, Builder $menu) { if ($this->hasChildren($item)) { - $this->addChildrenToMenu($item->title, $item->items, $menu, ['icon' => $item->icon]); + $this->addChildrenToMenu($item->title, $item->items, $menu, ['icon' => $item->icon, 'target' => $item->target]); } else { $target = $item->uri ?: $item->url; $menu->url( @@ -128,7 +128,7 @@ private function addSubItemToMenu(Menuitem $child, PingpongMenuItem $sub) $this->addChildrenToMenu($child->title, $child->items, $sub); } else { $target = $child->uri ?: $child->url; - $sub->url($target, $child->title, 0, ['icon' => $child->icon]); + $sub->url($target, $child->title, 0, ['icon' => $child->icon, 'target' => $child->target]); } }