PHPackages                             bostos/reorderable-columns - 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. bostos/reorderable-columns

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

bostos/reorderable-columns
==========================

This is my package reorderable-columns

v1.1.0(1y ago)124.6k↓45.2%1[2 issues](https://github.com/Bostos/reorderable-columns/issues)[4 PRs](https://github.com/Bostos/reorderable-columns/pulls)MITPHPPHP ^8.1CI passing

Since Jun 11Pushed 2mo agoCompare

[ Source](https://github.com/Bostos/reorderable-columns)[ Packagist](https://packagist.org/packages/bostos/reorderable-columns)[ Docs](https://github.com/bostos/reorderable-columns)[ GitHub Sponsors](https://github.com/Bostos)[ RSS](/packages/bostos-reorderable-columns/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (13)Versions (8)Used By (0)

Reorderable Columns
===================

[](#reorderable-columns)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ebd2022159c2b2327ac9f023a9bef0797a8fadfbd5e9fd99b5773415d91681e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626f73746f732f72656f7264657261626c652d636f6c756d6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bostos/reorderable-columns)[![Total Downloads](https://camo.githubusercontent.com/404ce22cc87ebc7eb42d6392521bba2a6d4275eeef88f7a6f414afdc723ca280/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626f73746f732f72656f7264657261626c652d636f6c756d6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bostos/reorderable-columns)

**Reorderable Columns** is a plugin for [Filament](https://filamentphp.com/) that allows users to reorder table columns via drag-and-drop. The new column order can be saved either in the session or persisted in the database (per user).

[![Reorderable Columns Demo](https://camo.githubusercontent.com/1b85206b5015ca9a9dd4fef339201d1b2fc1fdb7e05a31ce4215c1c19bde69a7/68747470733a2f2f7331342e67696679752e636f6d2f696d616765732f6278354d5a2e676966)](https://camo.githubusercontent.com/1b85206b5015ca9a9dd4fef339201d1b2fc1fdb7e05a31ce4215c1c19bde69a7/68747470733a2f2f7331342e67696679752e636f6d2f696d616765732f6278354d5a2e676966)

---

Features
--------

[](#features)

- **Intuitive Drag &amp; Drop:** Easily reorder table columns to create your preferred layout
- **Persistent Ordering:** Column order is saved and automatically reapplied on next visit
- **Flexible Storage Drivers:**
    - **Database:** Persist layouts per-user, so everyone gets their own custom view
    - **Session:** Keep the layout for the current session, resetting on logout
- **Seamless Integration:** Designed to feel like a native Filament feature
- **Smart Column Handling:**
    - Remembers the order of visible columns
    - Automatically places newly added columns at the end of the table

---

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require bostos/reorderable-columns
```

Then, publish and run the migrations to create the `reorderable_columns_orders` table:

```
php artisan vendor:publish --tag="reorderable-columns-migrations"
php artisan migrate
```

Optionally, publish the configuration file:

```
php artisan vendor:publish --tag="reorderable-columns-config"
```

---

⚙️ Usage
--------

[](#️-usage)

### Step 1: Register the Plugin in Your Panel Provider

[](#step-1-register-the-plugin-in-your-panel-provider)

In your `AdminPanelProvider.php` (or another panel provider), register the plugin inside the `panel()` method. You can choose the persistence strategy:

- `persistToSession()` *(default)* – Saves order in the session (lost on logout).
- `persistToDatabase()` – Persists per-user column order in the database.

```
use Bostos\ReorderableColumns\ReorderableColumnsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ... other configurations
        ->plugin(
            ReorderableColumnsPlugin::make()
                ->persistToSession() // or ->persistToDatabase()
        );
}
```

---

### Step 2: Use the Trait in Your ListRecords Page

[](#step-2-use-the-trait-in-your-listrecords-page)

In your ListRecords page class (e.g. `app/Filament/Resources/UserResource/Pages/ListUsers.php`), use the `HasReorderableColumns` trait and override the `$view` property.

```
use Bostos\ReorderableColumns\Concerns\HasReorderableColumns;
use Filament\Resources\Pages\ListRecords;

class ListUsers extends ListRecords
{
    use HasReorderableColumns;

    protected static string $view = 'filament.resources.users.pages.list-users';
}
```

> 💡 Don't forget to create the custom view in Step 4.

---

### Step 3: Enable Reordering on Your Table

[](#step-3-enable-reordering-on-your-table)

In your resource file (e.g. `UserResource.php`), chain the `->reorderableColumns()` method to your table definition. Provide a unique key (usually table or model name).

```
use Filament\Tables\Table;

public static function table(Table $table): Table
{
    return $table
        ->columns([
            // your columns
        ])
        ->filters([
            // your filters
        ])
        ->actions([
            // your actions
        ])
        ->reorderableColumns('users'); // Use a unique key
}
```

---

### Step 4: Create a Custom Blade View

[](#step-4-create-a-custom-blade-view)

Since Filament’s table component doesn’t allow custom HTML attributes on the outer wrapper, you’ll need to override the view and wrap the table manually.

#### 1. Create a custom view file

[](#1-create-a-custom-view-file)

At the path defined in Step 2, create:

```
resources/views/filament/resources/users/pages/list-users-reorderable.blade.php

```

#### 2. Copy the original view content

[](#2-copy-the-original-view-content)

Copy the content from:

```
vendor/filament/filament/resources/views/resources/pages/list-records.blade.php

```

Paste it into your custom Blade file.

#### 3. Wrap the table

[](#3-wrap-the-table)

Locate the line:

```
{{ $this->table }}
```

Wrap it in a `div` with a `data-reorderable-columns` attribute:

```
{{-- resources/views/filament/resources/users/pages/list-users-reorderable.blade.php --}}

    {{-- Required wrapper for reordering --}}

        {{ $this->table }}

```

Make sure the value (`users`) matches the key passed in `->reorderableColumns()`.

---

📝 Changelog
-----------

[](#-changelog)

Please refer to the [CHANGELOG](https://github.com/bostos/reorderable-columns/blob/main/CHANGELOG.md) for details on recent changes.

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please see the [CONTRIBUTING](https://github.com/bostos/reorderable-columns/blob/main/CONTRIBUTING.md) guide for details.

---

🔐 Security
----------

[](#-security)

If you discover a security vulnerability within this package, please send an e-mail to [nikolast\_metal@hotmail.com](mailto:nikolast_metal@hotmail.com). All security vulnerabilities will be promptly addressed.

---

🧠 Credits
---------

[](#-credits)

- [Bostos](https://github.com/bostos)

---

⚖️ License
----------

[](#️-license)

The MIT License (MIT). See the [LICENSE](https://github.com/bostos/reorderable-columns/blob/main/LICENSE) file for more details.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance66

Regular maintenance activity

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~3 days

Total

3

Last Release

383d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd6ef307d2ac465ecc13c9dfb52c4c4a31bda68b755ce3e3cadf8ade2b4842aa?d=identicon)[Bostos](/maintainers/Bostos)

---

Top Contributors

[![Bostos](https://avatars.githubusercontent.com/u/15669075?v=4)](https://github.com/Bostos "Bostos (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelfilamentBostosfilament-tablesreorderable-columns

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/bostos-reorderable-columns/health.svg)

```
[![Health](https://phpackages.com/badges/bostos-reorderable-columns/health.svg)](https://phpackages.com/packages/bostos-reorderable-columns)
```

###  Alternatives

[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[ysfkaya/filament-phone-input

A phone input component for Laravel Filament

3161.3M25](/packages/ysfkaya-filament-phone-input)[biostate/filament-menu-builder

An Elegant Menu Builder for FilamentPHP

6528.1k2](/packages/biostate-filament-menu-builder)[jibaymcs/filament-tour

Bring the power of DriverJs to your Filament panels and start a tour !

12453.6k](/packages/jibaymcs-filament-tour)[promethys/revive

A 'RecycleBin' page where users can restore or delete permanently soft-deleted models.

162.9k](/packages/promethys-revive)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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