spatie / laravel-menu

Html menu generator for Laravel
https://freek.dev/414-a-modern-package-to-generate-html-menus
MIT License
923 stars 82 forks source link

I want to delete the parent element if the child element disappears #85

Closed piotzkhider closed 5 years ago

piotzkhider commented 5 years ago
    public function submenuHas($header, $menu = null): Menu
    {
        [$header, $menu] = $this->parseSubmenuArgs(func_get_args());

        $menu = $this->createSubmenuMenu($menu);
        $header = $this->createSubmenuHeader($header);

        if ($menu->prependIf($header, $header)->count() === 0) {
            return $this;
        }

        return $this->add($menu);
    }
spatie-bot commented 5 years ago

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.