Download the PHP package tasmir/sidebar-manager without Composer
On this page you can find all versions of the php package tasmir/sidebar-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tasmir/sidebar-manager
More information about tasmir/sidebar-manager
Files in tasmir/sidebar-manager
Package sidebar-manager
Short Description A flexible, dynamic sidebar management package for Laravel applications. This package allows you to define, manipulate, and render your sidebar navigation entirely through code or configuration.
License MIT
Informations about the package sidebar-manager
Sidebar Manager for Laravel
A flexible, dynamic sidebar management package for Laravel applications. This package allows you to define, manipulate, and render your sidebar navigation entirely through code or configuration.
Features
- Fluent API: Expressive and easy registration of menu items.
- Facade Support: Use the
Sidebarfacade for clean, static-like access. - Config Driven: Define your core sidebar structure in
config/sidebar.php. - Dynamic Manipulation: Add or modify categories and items at runtime.
- Permission Based: Built-in support for Laravel's Gate/Permission system.
- Blade Component: Clean rendering using a single
<x-sidebar-manager-nav />component. - Badges: Support for static or dynamic (callable) badges.
- Active State Detection: Automatic highlighting of active menu items.
Installation
You can install the package via composer:
Publish the config file (optional):
Basic Usage
1. Rendering the Sidebar
Place the Blade component in your layout:
2. Static Configuration
You can define your menu in config/sidebar.php. You can also remove default categories or specific items:
3. Fluent API (via Facade)
You can manipulate the sidebar from anywhere (e.g., controllers, closures, or providers) using the Sidebar facade:
4. Blade Directives
You can also manage the sidebar directly from your Blade templates for view-specific adjustments:
Menu Item Configuration
Each item accepts a configuration array:
| Key | Type | Description |
|---|---|---|
label |
string |
Display text. |
route |
string |
Laravel route name. |
url |
string |
Fallback URL. |
params |
array |
Route parameters. |
icon |
string |
Raw HTML/SVG for the icon. |
active |
bool |
Active state logic. |
permission |
string |
Required permission. |
badge |
int\|Closure |
Static number or closure. |
order |
int |
Sort position. |
Contributing
Contributions are welcome! If you have any ideas, bug fixes, or improvements, feel free to open an issue or submit a pull request on GitHub.
Developed by Tasmir
License
The MIT License (MIT). Please see License File for more information.
All versions of sidebar-manager with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/view Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0