rapidwebltd/laravel-dynamic-menu

Laravel Dynamic Menu provides the foundation to build entirely dynamic database powered navigation menus for your web application.

Maintainers

Package info

github.com/rapidwebltd/laravel-dynamic-menu

pkg:composer/rapidwebltd/laravel-dynamic-menu

Transparency log

Statistics

Installs: 258

Dependents: 0

Suggesters: 0

Stars: 5

Open Issues: 0

v1.1.0 2026-07-18 08:52 UTC

This package is auto-updated.

Last update: 2026-07-18 08:55:02 UTC


README

This package provides the foundation to build entirely dynamic database powered navigation menus for your web application.

Requirements

This package requires:

  • PHP 7.0 or above
  • Laravel 5.5 through 13

Installation

You can install Laravel Dynamic Menu with Composer. Just run the following command.

composer require rapidwebltd/laravel-dynamic-menu

Setup

This package comes with various database migrations. To create the required tables, run the following Artisan command.

php artisan migrate

Laravel discovers the service provider automatically. The package retains its PHP 7.0 minimum while Composer selects a compatible framework version.

Adding menu items

Create a menu and add root or nested items with automatic sibling ordering.

$menu = new \RapidWeb\LaravelDynamicMenu\Models\Menu();
$menu->name = 'Main navigation';
$menu->save();

$home = $menu->add('Home', $homePage);
$menu->add('Contact', $contactPage);
$home->add('Overview', $overviewPage);

The optional final argument sets an explicit decimal display order. Items without a linked model are also supported and return an empty URL, which is useful for headings and nested groups.

$heading = $menu->add('Products');
$featured = $menu->add('Featured', $featuredPage, 0, 0.5);