Download the PHP package ycookies/filament-nav-manager without Composer
On this page you can find all versions of the php package ycookies/filament-nav-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ycookies/filament-nav-manager
More information about ycookies/filament-nav-manager
Files in ycookies/filament-nav-manager
Package filament-nav-manager
Short Description A powerful navigation management package for Filament v4 that allows you to dynamically manage your Filament panel navigation menus
License MIT
Homepage https://github.com/ycookies/filament-nav-manager
Informations about the package filament-nav-manager
Filament Nav Manager
A powerful navigation management package for Filament v4 that allows you to dynamically manage your Filament panel navigation menus through a user-friendly interface.
📖 English Documentation
Features
✨ Rich Feature Set
- 🎯 Dynamic navigation management through Filament UI
- 🔄 Automatic synchronization of Filament resources and pages
- 🌳 Tree-structured menu hierarchy support
- 🎨 Customizable navigation groups, icons, and badges
- 🔐 Role-based access control
- 🌍 Multi-language support (English, Simplified Chinese, Traditional Chinese)
- ⚡ Navigation caching for better performance
- 📦 Easy installation and setup
Installation
You can install the package via Composer:
Publish and Run Migrations
This command will:
- Publish the configuration file
- Publish migration files
- Ask if you want to run migrations
- Allow you to sync panels
Or manually:
Configuration
Enable the Plugin
Add the plugin to your Filament panel provider:
Configure Permissions
Edit config/nav-manager.php:
Customize Navigation Group
You can customize which navigation group the Nav Manager resource appears in:
Usage
Syncing Filament Resources and Pages
Option 1: Via UI
- Navigate to "Navigation Manager" in your Filament panel
- Click the "Sync Filament Menu" button
- Confirm the sync operation
Option 2: Via Command Line
Sync a specific panel:
Or sync all panels during installation:
Managing Navigation Items
Once installed, you'll see "Navigation Manager" in your Filament navigation. From there you can:
- ✅ Create new navigation items
- ✅ Edit existing items
- ✅ Delete items
- ✅ Reorder items (drag and drop if tree view is enabled)
- ✅ Toggle visibility
- ✅ Manage icons and badges
- ✅ Set permissions
Navigation Item Types
The package supports several navigation item types:
- Group - A navigation group that can contain child items
- Resource - Links to a Filament resource
- Page - Links to a Filament page
- Route - Links to a Laravel route
- URL - Links to any URL (internal or external)
Navigation Structure
Navigation items are organized in a hierarchical tree structure:
Advanced Usage
Programmatic Navigation Management
You can also manage navigation programmatically:
Custom Navigation Generation
Multi-Language Support
The package includes translations for:
- 🇬🇧 English (
en) - 🇨🇳 Simplified Chinese (
zh_CN) - 🇹🇼 Traditional Chinese (
zh_TW)
Translations are automatically loaded. Set your application locale:
Role-Based Access Control
Configure which roles can access the Navigation Manager:
If using Spatie Laravel Permission:
Set to null to allow all authenticated users:
Tree View Support
If your application has a treeView table macro (commonly used for hierarchical data), the navigation table will automatically use it for a better tree-structured display.
Clearing Navigation Cache
Or via model:
Database Schema
The package creates a nav_manager table with the following structure:
id- Primary keyparent_id- Parent menu item ID (0 for top-level)panel- Filament panel IDorder- Display ordertitle- Menu titletype- Menu type (group, resource, page, route, url)icon- Heroicon nameuri- URI pathtarget- Resource class, Page class, or route nameextension- Extension identifiershow- Visibility togglebadge- Badge textbadge_color- Badge coloris_collapsed- Collapsed statepermission- Required permissioncreated_at/updated_at- Timestamps
Commands
Install Command
Runs migrations and optionally syncs panels.
Sync Command
Syncs Filament resources and pages for a specific panel.
Troubleshooting
Navigation Not Appearing
- Ensure the plugin is registered in your Panel Provider
- Check that navigation items have
show = true - Verify user has required roles (if configured)
- Clear navigation cache:
NavManager::flushNavigationCache()
Sync Not Working
- Verify the panel ID exists
- Check that resources/pages are properly registered in the panel
- Review error logs for specific issues
Permission Issues
- Check
config/nav-manager.phpforallowed_rolesconfiguration - Verify user roles are correctly assigned
- Ensure Spatie Laravel Permission is installed if using roles
Requirements
- PHP >= 8.2
- Laravel >= 10.0
- Filament >= 4.0
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
The MIT License (MIT). Please see License File for more information.
Support
- 📧 Email: [email protected]
- 🐛 Issues: GitHub Issues
- 📖 Documentation: GitHub Wiki
Changelog
Please see CHANGELOG for more information on what has changed recently.
Made with ❤️ by eRic
All versions of filament-nav-manager with dependencies
filament/filament Version ^4.0|^5.0
guava/filament-icon-picker Version ^3.0|^4.0