tables
Create FilamentPHP v4 tables with columns, filters, sorting, search, and bulk actions
What this skill does
# FilamentPHP Tables Generation Skill
## Overview
This skill generates FilamentPHP v4 table configurations with columns, filters, actions, and bulk operations following official documentation patterns.
## Documentation Reference
**CRITICAL:** Before generating tables, read:
- `/home/mwguerra/projects/mwguerra/claude-code-plugins/filament-specialist/skills/docs/references/tables/`
- `/home/mwguerra/projects/mwguerra/claude-code-plugins/filament-specialist/skills/docs/references/tables/02-columns/`
- `/home/mwguerra/projects/mwguerra/claude-code-plugins/filament-specialist/skills/docs/references/tables/03-filters/`
## Workflow
### Step 1: Analyze Requirements
Identify:
- Columns to display
- Searchable fields
- Sortable fields
- Filter requirements
- Row actions
- Bulk actions
- Relationships to display
### Step 2: Read Documentation
Navigate to table documentation and extract:
- Column class names and options
- Filter configurations
- Action patterns
- Performance considerations
### Step 3: Generate Table
Build table configuration:
```php
use Filament\Tables;
use Filament\Tables\Table;
public static function table(Table $table): Table
{
return $table
->columns([
// Columns
])
->filters([
// Filters
])
->actions([
// Row actions
])
->bulkActions([
// Bulk actions
]);
}
```
## Column Types Reference
### Text Column
```php
// Basic text
Tables\Columns\TextColumn::make('name')
->searchable()
->sortable();
// With limit and tooltip
Tables\Columns\TextColumn::make('description')
->limit(50)
->tooltip(fn ($record): string => $record->description);
// Formatted
Tables\Columns\TextColumn::make('price')
->money('usd')
->sortable();
// Date formatting
Tables\Columns\TextColumn::make('created_at')
->dateTime('M j, Y H:i')
->sortable()
->since(); // Shows "2 hours ago"
// Copyable
Tables\Columns\TextColumn::make('uuid')
->copyable()
->copyMessage('UUID copied!')
->copyMessageDuration(1500);
// With color
Tables\Columns\TextColumn::make('status')
->color(fn (string $state): string => match ($state) {
'draft' => 'gray',
'reviewing' => 'warning',
'published' => 'success',
default => 'gray',
});
// HTML content
Tables\Columns\TextColumn::make('content')
->html()
->wrap();
// Word/character count
Tables\Columns\TextColumn::make('bio')
->words(10);
// List values (array)
Tables\Columns\TextColumn::make('tags')
->listWithLineBreaks()
->bulleted();
```
### Icon Column
```php
// Boolean icon
Tables\Columns\IconColumn::make('is_active')
->boolean();
// Custom icons
Tables\Columns\IconColumn::make('status')
->icon(fn (string $state): string => match ($state) {
'draft' => 'heroicon-o-pencil',
'reviewing' => 'heroicon-o-clock',
'published' => 'heroicon-o-check-circle',
})
->color(fn (string $state): string => match ($state) {
'draft' => 'info',
'reviewing' => 'warning',
'published' => 'success',
default => 'gray',
});
```
### Image Column
```php
// Basic image
Tables\Columns\ImageColumn::make('avatar')
->circular()
->size(40);
// Multiple images (stacked)
Tables\Columns\ImageColumn::make('images')
->circular()
->stacked()
->limit(3)
->limitedRemainingText();
// With default
Tables\Columns\ImageColumn::make('logo')
->defaultImageUrl(url('/images/default-logo.png'))
->square()
->size(60);
```
### Badge Column
```php
Tables\Columns\BadgeColumn::make('status')
->colors([
'danger' => 'draft',
'warning' => 'reviewing',
'success' => 'published',
])
->icons([
'heroicon-o-pencil' => 'draft',
'heroicon-o-clock' => 'reviewing',
'heroicon-o-check' => 'published',
]);
// Or with closure
Tables\Columns\BadgeColumn::make('priority')
->color(fn (string $state): string => match ($state) {
'low' => 'gray',
'medium' => 'warning',
'high' => 'danger',
});
```
### Color Column
```php
Tables\Columns\ColorColumn::make('color')
->copyable()
->copyMessage('Color code copied');
```
### Toggle Column
```php
// Editable inline toggle
Tables\Columns\ToggleColumn::make('is_active')
->onColor('success')
->offColor('danger')
->afterStateUpdated(fn () => Notification::make()
->title('Status updated')
->success()
->send()
);
```
### Select Column
```php
// Editable inline select
Tables\Columns\SelectColumn::make('status')
->options([
'draft' => 'Draft',
'published' => 'Published',
]);
```
### Text Input Column
```php
// Editable inline text
Tables\Columns\TextInputColumn::make('sort_order')
->rules(['required', 'numeric']);
```
### Checkbox Column
```php
// Editable inline checkbox
Tables\Columns\CheckboxColumn::make('is_featured');
```
### Relationship Columns
```php
// BelongsTo
Tables\Columns\TextColumn::make('author.name')
->label('Author')
->searchable()
->sortable();
// HasMany count
Tables\Columns\TextColumn::make('comments_count')
->counts('comments')
->label('Comments')
->sortable();
// HasMany sum
Tables\Columns\TextColumn::make('items_sum_quantity')
->sum('items', 'quantity')
->label('Total Quantity');
// BelongsToMany list
Tables\Columns\TextColumn::make('tags.name')
->badge()
->separator(',');
```
### View Column (Custom)
```php
Tables\Columns\ViewColumn::make('custom')
->view('filament.tables.columns.custom-column');
```
## Column Modifiers
```php
Tables\Columns\TextColumn::make('name')
// Search
->searchable()
->searchable(isIndividual: true)
// Sort
->sortable()
->sortable(['first_name', 'last_name'])
// Visibility
->toggleable()
->toggleable(isToggledHiddenByDefault: true)
->visible(fn (): bool => auth()->user()->isAdmin())
->hidden(fn ($record): bool => $record->is_private)
// Sizing
->grow(false)
->width('200px')
->alignCenter()
->alignEnd()
// Styling
->weight(FontWeight::Bold)
->size(TextColumn\TextColumnSize::Large)
->color('primary')
->extraAttributes(['class' => 'custom-class']);
```
## Filters Reference
### Select Filter
```php
Tables\Filters\SelectFilter::make('status')
->options([
'draft' => 'Draft',
'reviewing' => 'Reviewing',
'published' => 'Published',
]);
// Multiple selection
Tables\Filters\SelectFilter::make('status')
->multiple()
->options([
'draft' => 'Draft',
'published' => 'Published',
]);
// Relationship filter
Tables\Filters\SelectFilter::make('author')
->relationship('author', 'name')
->searchable()
->preload();
```
### Ternary Filter (Boolean)
```php
Tables\Filters\TernaryFilter::make('is_active')
->label('Active')
->boolean()
->trueLabel('Active only')
->falseLabel('Inactive only')
->native(false);
```
### Date Filter
```php
Tables\Filters\Filter::make('created_at')
->form([
Forms\Components\DatePicker::make('created_from'),
Forms\Components\DatePicker::make('created_until'),
])
->query(function (Builder $query, array $data): Builder {
return $query
->when(
$data['created_from'],
fn (Builder $query, $date): Builder => $query->whereDate('created_at', '>=', $date),
)
->when(
$data['created_until'],
fn (Builder $query, $date): Builder => $query->whereDate('created_at', '<=', $date),
);
})
->indicateUsing(function (array $data): array {
$indicators = [];
if ($data['created_from'] ?? null) {
$indicators['created_from'] = 'From ' . Carbon::parse($data['created_from'])->toFormattedDateString();
}
iRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.