Download the PHP package hayderhatem/filament-sub-navigation without Composer

On this page you can find all versions of the php package hayderhatem/filament-sub-navigation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-sub-navigation

Filament Sub Navigation

Latest Version on Packagist Total Downloads

Add beautiful dropdown sub-navigation menus to your Filament sidebar navigation items with just one trait!

✨ Features

📸 Preview

When you hover over a navigation item with sub-navigation, a beautiful dropdown appears:

🚀 Installation

Install the package via Composer:

The package will auto-register its service provider.

📋 Quick Start

Step 1: Add the Trait

Add the HasBadgeSubNavigation trait to any Filament Resource:

Step 2: Configure Navigation

In your Resource, override the getNavigationItems() method:

Step 3: Define Sub-Navigation Items

Add the getSubNavigationItems() method to your Resource:

Step 4: Register Sub-Navigation Data

In your AdminPanelProvider.php, add sub-navigation data registration:

That's it! 🎉 Your sub-navigation dropdowns will now appear when hovering over navigation items.

🔧 Advanced Usage

Multiple Resources with Sub-Navigation

You can add sub-navigation to multiple resources:

Using Alpine.js Component (Optional)

For advanced customization, you can use the included Alpine.js component:

Custom Styling

The package automatically adapts to Filament's theme, but you can add custom CSS:

🐛 Troubleshooting

Navigation Items Not Showing Dropdowns

  1. Check Console Logs: Open browser developer tools and look for sub-navigation debug messages
  2. Verify Key Matching: Ensure the key in getSubNavigationItems() matches your navigation label (lowercase, alphanumeric only)
  3. Clear Caches: Run php artisan cache:clear && php artisan view:clear

Example Debug Output

Dropdown Not Positioned Correctly

The package automatically handles positioning, but if you have custom CSS that affects the sidebar, you might need to adjust:

Dark Mode Issues

The package auto-detects dark mode, but if you have custom theme switching, you can manually trigger reinitialization:

🎨 Customization Options

Sub-Navigation Item Structure

Each sub-navigation item supports these properties:

Navigation Key Generation

The package generates keys from navigation labels using this logic:

📚 API Reference

HasBadgeSubNavigation Trait

Methods

createBadgeNavigation()

Creates a navigation item with sub-navigation support.

Parameters:

getSubNavigationItems()

Returns array of sub-navigation items grouped by navigation key.

Returns: array<string, array>

🔄 Changelog

v1.0.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.

🙏 Credits


Made with ❤️ for the Filament community


All versions of filament-sub-navigation with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/filament Version ^3.0
spatie/laravel-package-tools Version ^1.15.0
illuminate/contracts Version ^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hayderhatem/filament-sub-navigation contains the following files

Loading the files please wait ....