PHPackages                             gflaminio3/filament-nested-grouping - 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. gflaminio3/filament-nested-grouping

ActiveLibrary

gflaminio3/filament-nested-grouping
===================================

Nested (multi-level) grouping for Filament Tables

1.0.0(6mo ago)06MITPHPPHP &gt;=8.1

Since Nov 4Pushed 6mo agoCompare

[ Source](https://github.com/gflaminio3/filament-nested-grouping)[ Packagist](https://packagist.org/packages/gflaminio3/filament-nested-grouping)[ RSS](/packages/gflaminio3-filament-nested-grouping/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Filament Nested Grouping
========================

[](#filament-nested-grouping)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1115d74be89eae851b42924144f1b2f331a81bf8c4073f70013c035f613ab51d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67666c616d696e696f332f66696c616d656e742d6e65737465642d67726f7570696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gflaminio3/filament-nested-grouping)[![Total Downloads](https://camo.githubusercontent.com/a404f1fbd9f21c04d2c0986704493eaffe1f7e2e97925c164ce414ce9d92640b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67666c616d696e696f332f66696c616d656e742d6e65737465642d67726f7570696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gflaminio3/filament-nested-grouping)[![License](https://camo.githubusercontent.com/99dd87904a80528055266719e04134b1012f032eb071000fe5010074dd2af3f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f67666c616d696e696f332f66696c616d656e742d6e65737465642d67726f7570696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gflaminio3/filament-nested-grouping)

This package extends Filament Tables to provide nested (multi-level) grouping capabilities.

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require gflaminio3/filament-nested-grouping
```

Register the plugin in your Filament `PanelProvider`:

```
// app/Providers/Filament/AdminPanelProvider.php

use gflaminio3\FilamentNestedGrouping\Plugins\NestedGroupingPlugin;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            // ...
            ->plugins([
                NestedGroupingPlugin::make(),
            ]);
    }
}
```

Usage
-----

[](#usage)

Use the `NestedGroup` class instead of Filament's standard `Group` for multi-level grouping.

```
use Filament\Tables\Table;
use Filament\Tables\Columns\TextColumn;
use gflaminio3\FilamentNestedGrouping\Tables\Grouping\NestedGroup;

class ListProducts extends ListRecords
{
    public static function table(Table $table): Table
    {
        return $table
            ->columns([
                TextColumn::make('category.name'),
                TextColumn::make('sub_category.name'),
                TextColumn::make('name'),
                TextColumn::make('price')->money(),
            ])
            ->groups([
                NestedGroup::make('category.name')
                    ->title('Category / Sub Category') // Optional custom title for the main group
                    ->thenBy('sub_category.name')       // Group by sub-category
                    ->thenByDate('created_at', 'month'), // Group by creation date (monthly)
            ]);
    }
}
```

- `NestedGroup::make(string $column)`: Starts a new nested group.
- `->thenBy(string $column)`: Adds an additional grouping level by column.
- `->thenByDate(string $column, string $precision = 'day')`: Adds an additional grouping level by a date column, specifying `year`, `month`, or `day` precision.
- `->title(string $title)`: Sets a custom title for the main nested group.

How it Works
------------

[](#how-it-works)

The package extends Filament's `Group` class, introducing a `NestedGroup` to handle multiple grouping levels. It generates a composite key for each nested group and modifies Eloquent queries to include the necessary `GROUP BY` and `ORDER BY` clauses across all levels, including relationships.

Contributing
------------

[](#contributing)

Feel free to submit pull requests or report issues.

License
-------

[](#license)

This project is licensed under the MIT License.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance68

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

189d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83f014854386a67fc1f0b7a42ddea2018f0c8189df44931f055243700c2b06c8?d=identicon)[gflaminio3](/maintainers/gflaminio3)

---

Top Contributors

[![gflaminio3](https://avatars.githubusercontent.com/u/114490362?v=4)](https://github.com/gflaminio3 "gflaminio3 (2 commits)")

### Embed Badge

![Health badge](/badges/gflaminio3-filament-nested-grouping/health.svg)

```
[![Health](https://phpackages.com/badges/gflaminio3-filament-nested-grouping/health.svg)](https://phpackages.com/packages/gflaminio3-filament-nested-grouping)
```

###  Alternatives

[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[kirschbaum-development/commentions

A package to allow you to create comments, tag users and more

12369.2k](/packages/kirschbaum-development-commentions)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[calebdw/larastan-livewire

A Larastan / PHPStan extension for Livewire.

43482.4k3](/packages/calebdw-larastan-livewire)[a2insights/filament-saas

Filament Saas for A2Insights

161.1k](/packages/a2insights-filament-saas)

PHPackages © 2026

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