jeffersongoncalves / laravel-cms-menu
Navigation menus and menu items — hierarchical, translatable, optionally linked to any polymorphic model — for the Laravel CMS ecosystem
Package info
github.com/jeffersongoncalves/laravel-cms-menu
pkg:composer/jeffersongoncalves/laravel-cms-menu
1.0.0
2026-07-21 10:05 UTC
Requires
- php: ^8.2
- illuminate/contracts: ^11.0|^12.0|^13.0
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- spatie/laravel-package-tools: ^1.15
- spatie/laravel-translatable: ^6.11
Requires (Dev)
- larastan/larastan: ^2.9|^3.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
README
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.
