PHPackages                             clevel/collapsible-resource-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. clevel/collapsible-resource-manager

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

clevel/collapsible-resource-manager
===================================

A custom sidebar menu with collapsible groups

v1.2.4(6y ago)1243MITPHPPHP &gt;=7.1.0

Since Sep 28Pushed 6y agoCompare

[ Source](https://github.com/C-Level/collapsible-resource-manager)[ Packagist](https://packagist.org/packages/clevel/collapsible-resource-manager)[ RSS](/packages/clevel-collapsible-resource-manager/feed)WikiDiscussions master Synced today

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

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

[](#collapsible-resource-manager)

[![Latest Version on Packagist](https://camo.githubusercontent.com/215c5828dc3debb5685aa97d37a65b9bfae397240dce6b21c1e265da63b87a4d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6469676974616c2d63726561746976652f636f6c6c61707369626c652d7265736f757263652d6d616e61676572)](https://packagist.org/packages/digital-creative/collapsible-resource-manager)[![Total Downloads](https://camo.githubusercontent.com/91832ea506ba3cd7d0af2797a71dee54b4e67f6e94a5bf37fa41828fabc9a7c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6469676974616c2d63726561746976652f636f6c6c61707369626c652d7265736f757263652d6d616e61676572)](https://packagist.org/packages/digital-creative/collapsible-resource-manager)[![License](https://camo.githubusercontent.com/9a7d01439c1344c776625129bb5b0734bdd4f5f869b800790a91c7e60cf5864f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6469676974616c2d63726561746976652f636f6c6c61707369626c652d7265736f757263652d6d616e61676572)](https://github.com/dcasia/collapsible-resource-manager/blob/master/LICENSE)

[![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',
    '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(...)
    ]
]);
```

#### 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',
    'icon' => null,
    '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

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

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

Every ~8 days

Recently: every ~23 days

Total

21

Last Release

2252d ago

Major Versions

v0.1.9 → v1.0.02019-11-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46748527?v=4)[sormagec](/maintainers/sormagec)[@sormagec](https://github.com/sormagec)

![](https://www.gravatar.com/avatar/3ab2f8d442ad3a3f49afce5b031292af0300ac32821a7fd5cbd3f83db6bcc07a?d=identicon)[kaan](/maintainers/kaan)

---

Top Contributors

[![milewski](https://avatars.githubusercontent.com/u/2874967?v=4)](https://github.com/milewski "milewski (26 commits)")[![clevel-kaan](https://avatars.githubusercontent.com/u/58694321?v=4)](https://github.com/clevel-kaan "clevel-kaan (1 commits)")[![eugenefvdm](https://avatars.githubusercontent.com/u/1836436?v=4)](https://github.com/eugenefvdm "eugenefvdm (1 commits)")

---

Tags

laravelcollapsenovasidebarcollapsible

### Embed Badge

![Health badge](/badges/clevel-collapsible-resource-manager/health.svg)

```
[![Health](https://phpackages.com/badges/clevel-collapsible-resource-manager/health.svg)](https://phpackages.com/packages/clevel-collapsible-resource-manager)
```

###  Alternatives

[digital-creative/collapsible-resource-manager

A custom sidebar menu with collapsible groups

201869.2k1](/packages/digital-creative-collapsible-resource-manager)[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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