PHPackages                             codicastudio/menu-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codicastudio/menu-manager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codicastudio/menu-manager
=========================

A random Codica Studio package.

1.0.0(5y ago)04[20 PRs](https://github.com/codicastudio/menu-manager/pulls)MITPHPPHP ^7.4 || ^8.0

Since Sep 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/codicastudio/menu-manager)[ Packagist](https://packagist.org/packages/codicastudio/menu-manager)[ Docs](https://github.com/codicastudio/menu-manager)[ RSS](/packages/codicastudio-menu-manager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (22)Used By (0)

Collapsible Resource Manager
============================

[](#collapsible-resource-manager)

[![Laravel Nova Collapsible Resource Manager in action](https://raw.githubusercontent.com/dcasia/collapsible-resource-manager/master/screenshots/demo-1.png)](https://raw.githubusercontent.com/dcasia/collapsible-resource-manager/master/screenshots/demo-1.png)

Provides an easy way to order and group your resources on the sidebar.

Installation
============

[](#installation)

You can install the package via composer:

```
composer require digital-creative/collapsible-resource-manager

```

Next up, you must register the tool with Nova. This is typically done in the `tools` method of the `NovaServiceProvider.`

```
class NovaServiceProvider extends NovaApplicationServiceProvider
{
    public function tools()
    {
        return [
            // ...
            new CollapsibleResourceManager([
                'navigation' => [
                    TopLevelResource::make([
                        'label' => 'Resources',
                        'resources' => [
                            \App\Nova\User::class
                        ]
                    ]),
                ]
            ])
        ];
    }
}
```

#### Options

[](#options)

```
new CollapsibleResourceManager([
    'disable_default_resource_manager' => true, // default
    'remember_menu_state' => false, // default
    'navigation' => [
        TopLevelResource::make(...),
        TopLevelResource::make(...)
    ]
]);
```

On the `navigation` key only `TopLevelResource` are allowed to be used, any other resource will be ignored.

Navigation Resources
====================

[](#navigation-resources)

#### TopLevelResource

[](#toplevelresource)

```
TopLevelResource::make([
    'label' => 'Resources',
    'expanded' => null,
    'badge' => null,
    'icon' => null,
    'linkTo' => null, // accepts an instance of `NovaResource` or a Nova `Resource::class`
    'resources' => [
        NovaResource::make(...),
        Group::make(...),
        LensResource::make(...),
        InternalLink::make(...),
        ExternalLink::make(...),
        RawResource::make(...)
    ]
]);
```

Top-Level items aren't collapsible by default (`'expanded' => null`). If you set `expanded` to `true` or `false`, it will show a collapsible indicator on the right side of the heading. If `true`, it will be open by default, if `false` it will be closed by default.

#### NovaResource

[](#novaresource)

You can either pass a `\App\Nova\Resource::class` or a instance of `NovaResource`

```
NovaResource::make(\App\Nova\Customer::class);
```

Additionally you can redirect the user to specific views on click by chaining one of these methods:

```
NovaResource::make(\App\Nova\Customer::class)->index(); // Open the create index for the given resource - default
NovaResource::make(\App\Nova\Customer::class)->create(); // Open the create view for the given resource
NovaResource::make(\App\Nova\Customer::class)->detail($resourceId); // Open the detail view for the given ID
NovaResource::make(\App\Nova\Customer::class)->edit($resourceId); // Open the form view of the given ID
```

Authorization is also respected for each of these views

#### Group

[](#group)

Group appears as a toggle with a +/- sign that allows user to collapse multiple items into a single entry on the sidebar:

```
Group::make([
    'label' => 'Admin',
    'expanded' => false,
    'resources' => [
        // any resource instance
    ]
]);
```

#### InternalLink

[](#internallink)

Internal Link is an easy way to manually direct user to an specific URL using the default navigation mechanism:

```
InternalLink::make([
    'label' => 'My custom internal link',
    'badge' => null,
    'icon' => null,
    'target' => '_self',
    'path' => '/my/custom/resource/url',
    'params' => [ 'resourceId' => 1 ],
    'query' => [' resource_per_page' => 100 ]
]);
```

#### LensResource

[](#lensresource)

Lens Resource is a quickly way to add an entry on the sidebar that directs the user directly to an lens view for a given resource,

It requires 2 params: the resource the lens was used and the lens class itself you want to link to:

```
LensResource::make(
    \App\Nova\Customer::class,
    \App\Nova\Lenses\MostValuableCustomers::class
);
```

#### ExternalLink

[](#externallink)

External links are useful to add entries on the menu that redirects user to an external URL:

```
ExternalLink::make([
    'label' => 'Google',
    'badge' => null,
    'icon' => null,
    'target' => '_blank',
    'url' => 'https://google.com.br'
]);
```

#### RawResource

[](#rawresource)

If none of the pre-configured resources suffice your needs, RawResource provides an way to manually define what params the should be built with:

```
RawResource::make([
    'label' => 'Customer',
    'badge' => null,
    'icon' => null,
    'target' => '_self',
    'name' => 'index',
    'path' => null,
    'params' => [ 'resourceName' => 'customer' ],
    'query' => [ 'foo' => 'bar' ],
]);
```

Authorization
=============

[](#authorization)

All the resources uses `AuthorizedToSee` nova trait therefor they behave like tools and cards, where you can chain `canSee` to determine if the current logged in user is allowed to see the resource.

```
Group::make(...)->canSee(function($request) {
    return true/false;
});
```

By default `NovaResource` will follow the default policy registered for the given resource, however it can be overridden by chaining the `->canSee()` manually

Resource Labels and Translations
================================

[](#resource-labels-and-translations)

You can pass translated labels to any resource by calling the `->label()` method, eg:

```
NovaResource::make(\App\Nova\Customer::class)->label(function() { return __('Customer'); }); // or
NovaResource::make(\App\Nova\Customer::class)->label(__('Customer'));
```

Resource Icons
==============

[](#resource-icons)

You can define icons for `NovaResource` by either:

- Calling `->icon()` method on the `NovaResource` it accepts a `Closure` that returns a `string` or a `string` directly
- Setting a static method called `icon` that returns an string on the resource class:

```
class Customer extends Resource
{
    //...
    public static function icon(): string
    {
        return  function() { return '...' }, // or
    'icon' => '...',
]);

ExternalLink::make(...)->icon(function() { return '...' }); // or
ExternalLink::make(...)->icon('...');
```

[![Icons](https://raw.githubusercontent.com/dcasia/collapsible-resource-manager/master/screenshots/menu-icons.png)](https://raw.githubusercontent.com/dcasia/collapsible-resource-manager/master/screenshots/menu-icons.png)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://raw.githubusercontent.com/dcasia/collapsible-resource-manager/master/LICENSE) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity69

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2059d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a33b354bea681b74be49f37bbe9f3c4f145dbefe0f2b5cbb705b0731bf13fd3?d=identicon)[codicastudio](/maintainers/codicastudio)

### Embed Badge

![Health badge](/badges/codicastudio-menu-manager/health.svg)

```
[![Health](https://phpackages.com/badges/codicastudio-menu-manager/health.svg)](https://phpackages.com/packages/codicastudio-menu-manager)
```

###  Alternatives

[kirschbaum-development/nova-inline-select

An inline select field for Laravel Nova apps.

95486.7k1](/packages/kirschbaum-development-nova-inline-select)[bdelespierre/php-kmeans

K-Means algorithm for PHP

91134.1k3](/packages/bdelespierre-php-kmeans)[paulzi/yii2-adjacency-list

Adjacency List Behavior for Yii2

68237.4k16](/packages/paulzi-yii2-adjacency-list)[ckfinder/ckfinder-symfony-bundle

CKFinder bundle for Symfony

42435.7k](/packages/ckfinder-ckfinder-symfony-bundle)[stevegrunwell/time-constants

A series of constants designed to make it easier to express time in PHP applications

28402.4k2](/packages/stevegrunwell-time-constants)[savvot/random

Deterministic pseudo-random generators library with dozens of useful functions and several sources of randomness

21243.7k5](/packages/savvot-random)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
