Pivot Table Free
Free pivot table Blade component for FilamentPHP. Group Eloquent records into a 2-dimensional pivot with Sum aggregation. Works with Filament 3, 4, and 5.
Author:
PtPlugins
Documentation
- Installation
- Examples
- What's included (Free)
- What's NOT included — that's where Pro comes in
- License
Free Blade component that renders Eloquent records as a pivot table with Sum aggregation. Works with Filament 3, 4, and 5.
Live demo: ptplugins.com/demo/pivot-pro — no signup required. The demo shows the Pro version with all features; the Free component renders the same table style limited to 2×2 dimensions and Sum aggregation.
<x-pivot-free::pivot-table
:records="$sales"
rowField="region"
columnField="month"
valueField="amount"
/>
That's it. One line in your view — pivot on screen.
#Installation
composer require ptplugins/filament-pivot-table-free
No publishing, no migrations, no config. The component auto-registers as <x-pivot-free::pivot-table />.
#Examples
#1. Single dimension (1 row × 1 column)
// In your Filament Resource page or any Blade view:
$sales = Sale::query()->whereYear('created_at', 2026)->get();
<x-pivot-free::pivot-table
:records="$sales"
rowField="region"
columnField="month"
valueField="amount"
title="Sales by Region & Month"
/>
#2. Two dimensions (2 row × 2 column)
<x-pivot-free::pivot-table
:records="$sales"
:rowFields="['region', 'category']"
:columnFields="['year', 'quarter']"
valueField="amount"
/>
The leftmost dimensions are rendered as grouping headers (rowspan / colspan).
#3. Eloquent query (lazy)
If you'd rather pass a query, the component runs ->get() for you:
<x-pivot-free::pivot-table
:query="App\Models\Sale::query()->whereYear('created_at', 2026)"
rowField="region"
columnField="month"
valueField="amount"
/>
#What's included (Free)
- Up to 2 row × 2 column dimensions
- Sum aggregation
- Grand Total
- Light + dark theme out of the box (Tailwind
dark:variants) - Translations — English bundled, publish & override for any locale
- Eloquent query OR Collection / array of records
- Filament v3 + v4 + v5 compatible (single codebase)
#Requirements
- Laravel 10+ / 11+ / 12+
- PHP 8.2+
- Tailwind CSS in your build — every Filament project already has it. The component uses standard utility classes (
bg-white,dark:bg-gray-900,text-gray-900, etc.) that ship with the default Tailwind preset.
#Translations
# Publish English (and any other locales you add later)
php artisan vendor:publish --tag=pivot-free-translations
Edit / add at lang/vendor/pivot-free/{locale}/messages.php.
#What's NOT included — that's where Pro comes in
| Feature | Free | Pro |
|---|---|---|
| Row × column dimensions | up to 2 × 2 | unlimited (multi-level) |
| Aggregations | Sum | Sum, Avg, Count, Min, Max, % |
| Drill-down (expand / collapse) | — | ✅ |
| Heatmap (color gradients) | — | ✅ |
| Trend indicators (▲ / ▼ %) | — | ✅ |
| CSV / Excel export | — | ✅ |
| Configurable UI (Rows / Cols / Values pickers) | — | ✅ |
| Saved filter sets / configurations | — | ✅ |
| URL deep linking | — | ✅ |
| Filament Resource Page integration | — | ✅ |
| Priority email support + 1-year updates | — | ✅ |
→ Upgrade to Pro at ptplugins.com — Solo $70 / Unlimited $210
#License
MIT. Made with ❤️ by Premtech agency.
The author
From the same author
Featured Plugins
A selection of plugins curated by the Filament team
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
Spotlight Pro
Browse your Filament Panel with ease. Filament Spotlight Pro adds a Spotlight/Raycast like Command Palette to your Filament Panel.
Dennis Koch
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese