jeffersongoncalves/laravel-cms-menu

Navigation menus and menu items — hierarchical, translatable, optionally linked to any polymorphic model — for the Laravel CMS ecosystem

Maintainers

Package info

github.com/jeffersongoncalves/laravel-cms-menu

Homepage

Issues

pkg:composer/jeffersongoncalves/laravel-cms-menu

Transparency log

Statistics

Installs: 1

Dependents: 1

Suggesters: 0

Stars: 1

1.0.0 2026-07-21 10:05 UTC

This package is auto-updated.

Last update: 2026-07-21 10:47:22 UTC


README

Laravel CMS Menu

Laravel CMS Menu

Navigation menus and menu items — hierarchical, translatable labels, optionally linked to any polymorphic model. Backend-only: models, migrations, config.

Installation

composer require jeffersongoncalves/laravel-cms-menu
php artisan vendor:publish --tag="cms-menu-config"
php artisan migrate

Usage

$menu = Menu::create(['name' => 'Header', 'slug' => 'header', 'location' => 'header']);

$menu->items()->create([
    'label' => ['en' => 'Blog'],
    'linkable_type' => Post::class,
    'linkable_id' => $post->id,
    'order' => 0,
]);

$menu->rootItems; // top-level items, ordered, each with ->children

url is a plain fallback; linkable is a polymorphic relation to any model (e.g. a CMS Page or Post) — the host application resolves the final link.