Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Vedi Menu Bundle Laravel Package

blackator/vedi-menu-bundle

View on GitHub
Deep Wiki
Context7

VediMenu bundle for Symfony Flex

This bundle adds functionality for working with menus in Symfony.

Installation

composer require blackator/vedi-menu-bundle

Usage

<?php

namespace App\Controller;

use Blackator\Bundle\VediMenuBundle\Loaders\YamlMenuLoader;
use Blackator\Bundle\VediMenuBundle\Service\VediMenu;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;

class HomeController extends AbstractController
{
    /**
     * @Route("/", name="home")
     */
    public function index(VediMenu $vediMenu): Response
    {
        $menu = $vediMenu->create(new YamlMenuLoader($this->getParameter('kernel.project_dir') . '/config/menu/main_menu.yaml'), 'main');
        return $this->render('home/index.html.twig', ['menu' => $menu]);
    }
}

In twig template

{{ render_menu(menu) }}

VediMenu - a service for creating a Menu object from loader's data

YamlMenuLoader - a class for loading data from YAML file. Extended Blackator\Bundle\VediMenuBundle\Loaders\AbstractMenuLoader.

The default TWIG template is located at vendor/blackator/vedi-menu-bundle/Resources/views/default.html.twig or @VediMenu/default.html.twig as TWIG path.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle