Download the PHP package cooper/filament-dcat-filters without Composer
On this page you can find all versions of the php package cooper/filament-dcat-filters. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cooper/filament-dcat-filters
More information about cooper/filament-dcat-filters
Files in cooper/filament-dcat-filters
Package filament-dcat-filters
Short Description Bring Dcat Admin's powerful filter features to Filament - including Scope filters, Range filters, SelectTable, and more quick filters
License MIT
Homepage https://github.com/myxiaoao/filament-dcat-filters
Informations about the package filament-dcat-filters
Features
Core Filters
- 🎯 Scope Filter - Tab-style quick filters for common queries
- 📊 Range Filter - Simplified date/number range filtering (3 lines of code!)
- 📅 Date Component Filter - Filter by year, month, or day separately
- 🔍 SelectTable Filter - Modal table selector with search and pagination
- 🎭 Modal Select Filter - Dcat Admin style modal with full table display
- 🔢 Between Filter - Numeric range filtering shortcut
- 🙈 Hidden Filter - URL parameter-based filtering without UI
Quick Filters
- ⚡ LIKE Filter - Text search with wildcard control (supports NOT LIKE)
- 📋 IN Filter - Multiple value selection (supports NOT IN)
- 🔢 Comparison Filter - Comparison operators (>, <, >=, <=, =, !=)
- ✅ Boolean Filter - True/false/all toggle for boolean fields
- 🔘 Null Filter - NULL/NOT NULL value filtering
- 📝 Enum Filter - Auto-generate options from PHP 8.1+ Enum classes
- 🔍 FullText Filter - Search across multiple fields simultaneously
- 📆 Relative Date Filter - Pre-defined date range shortcuts
Specialized Filters
- 🗄️ JSON Filter - Query JSON/JSONB columns with path access
- 🏷️ FindInSet Filter - Query comma-separated values using FIND_IN_SET
- 🔤 Regex Filter - Pattern matching with regular expressions
- 📱 InputMask Filter - Formatted input with masks (phone, credit card, etc.)
- 📍 GeoLocation Filter - Geographic proximity filtering with Haversine formula
- 🔗 Filter Group - Combine filters with AND/OR logic
New in v2.0
- 🗑️ SoftDelete Filter - Built-in soft delete visibility control (withTrashed/onlyTrashed)
- 🔍 Exists Filter - Filter by relationship existence (whereHas/whereDoesntHave)
- 📊 Aggregate Filter - Filter by relationship aggregates (count, sum, avg, max, min + having)
- ⚖️ Column Compare Filter - Compare two database columns (whereColumn)
- 🧩 Advanced JSON Filter - Array contains, path exists, key exists for JSON columns
- 🕐 Timezone Aware Date Filter - Auto timezone conversion between user and database
- 🔀 Morph Relation Filter - MorphTo and MorphToMany polymorphic relationship filtering
- 📐 Filter State Protocol - Declarative
FilterStateDescriptorfor all 29 filters - 🚦 Database Driver Fail-Fast - Runtime driver compatibility checks with clear errors
- 🔄 Sort Presets - Quick sort shortcuts with export/import support
- 🔗 Nested Relationships - Deep path filtering (
author.company.country) - 🔎 Remote Search - Server-side search for SelectTableFilter (large datasets)
- 📊 Capability Matrix - Auto-generated via
php artisan dcat-filters:matrix
Advanced Features
- 🔄 Reset All Filters - One-click reset button for all active filters
- 💾 Filter State Persistence - Remember filter states across sessions
- 🔗 URL Query Parameter Sync - Shareable filter URLs without page reload
- 🔗 Cascading Select Filter - Dynamic dependent dropdowns
- ♿ Accessibility Support - ARIA labels and keyboard navigation
- 📋 Filter Presets - Save and load filter combinations
- 🔢 Scope Badge Counts - Display record counts on scope tabs
- 📤 Filter Export/Import - Share filter configurations via URL or JSON
- 🔄 Sort Presets - Quick sort shortcuts with shareable state
Additional Features
- 🎨 Highly Customizable - Extensive customization options for each filter
- 📱 Mobile Friendly - Responsive design for all screen sizes
- 🌐 Bilingual Docs - Complete English and Chinese documentation
- ✅ Fully Tested - Comprehensive test coverage with 1073 tests
Version Compatibility
| Filament | Filament Dcat Filters | PHP | Laravel |
|---|---|---|---|
| 5.x | 2.x | ^8.3 | ^12.0 | ^13.0 |
| 4.x | 2.x | ^8.3 | ^12.0 | ^13.0 |
Installation
You can install the package via composer:
Optionally, you can publish the config file:
Optionally, you can publish the views:
Quick Start
Scope Filter
Perfect for quick filtering with tab-style buttons:
View detailed documentation →
Range Filter
Simplified date/number range filtering:
View detailed documentation →
SelectTable Filter
Modal table selector with search and pagination:
View detailed documentation →
Date Component Filter
Filter by year, month, or day components:
View detailed documentation →
Modal Select Filter
Dcat Admin style modal with full table display:
View detailed documentation →
Quick Filters
Built-in filters for common operations:
View detailed documentation →
Boolean Filter
Dedicated true/false/all toggle for boolean fields:
Null Filter
Filter for NULL or NOT NULL values:
Enum Filter
Auto-generate options from PHP 8.1+ Enum classes:
FullText Filter
Search across multiple fields simultaneously:
Relative Date Filter
Pre-defined date range shortcuts:
Hidden Filter
URL parameter-based filtering (no UI):
View detailed documentation →
SoftDelete Filter
Control soft-deleted record visibility:
View detailed documentation →
Exists Filter
Filter by relationship existence:
View detailed documentation →
Aggregate Filter
Filter by relationship aggregate values:
View detailed documentation →
Column Compare Filter
Compare two database columns:
View detailed documentation →
Advanced JSON Filter
Structural JSON queries:
View detailed documentation →
Timezone Aware Date Filter
Date range with automatic timezone conversion:
View detailed documentation →
Morph Relation Filter
Polymorphic relationship filtering:
View detailed documentation →
Remote Search (Server-Side)
For large datasets, use server-side search:
View detailed documentation →
Reset All Filters
Add a one-click reset button:
View detailed documentation →
Filter State Persistence
Remember filter states across sessions:
View detailed documentation →
URL Query Parameter Sync
Shareable filter URLs:
View detailed documentation →
Cascading Select Filter
Dynamic dependent dropdowns:
View detailed documentation →
Documentation
Core Filters
- 📖 Scope Filter - Tab-style quick filters
- 📖 Range Filter - Date/number range filtering
- 📖 Date Component Filter - Year/Month/Day filtering
- 📖 SelectTable Filter - Modal table selector
- 📖 Modal Select Filter - Dcat Admin style modal table selector
- 📖 Quick Filters - LIKE, IN, GT, LT, BETWEEN filters
Specialized Filters
- 📖 JSON Filter - Query JSON/JSONB columns with path access
- 📖 FindInSet Filter - Query comma-separated values
- 📖 Regex Filter - Pattern matching with regular expressions
- 📖 InputMask Filter - Formatted input with masks
- 📖 GeoLocation Filter - Geographic proximity filtering
- 📖 Filter Group - Combine filters with AND/OR logic
New Filter Types
- 📖 SoftDelete Filter - Soft delete visibility control
- 📖 Exists Filter - Relationship existence filtering
- 📖 Aggregate Filter - Relationship aggregate filtering
- 📖 Column Compare Filter - Column comparison
- 📖 Advanced JSON Filter - Structural JSON queries
- 📖 Timezone Aware Date Filter - Timezone conversion
- 📖 Morph Relation Filter - Polymorphic relationships
- 📖 Capability Matrix - Auto-generated filter capabilities
Advanced Features
- 📖 Reset All Filters - One-click reset functionality
- 📖 Filter State Persistence - Session-based filter memory
- 📖 URL Query Parameter Sync - Shareable filter URLs
- 📖 Cascading Select Filter - Dynamic dependent dropdowns
- 📖 Accessibility - ARIA labels and keyboard support
- 📖 Advanced Features - API support, Hidden filters
- 📖 Concerns (Traits) - Filter presets, badge counts, export/import
Guides & References
- 📖 Usage Examples - Complete working examples
- 📖 Demo Guide - Interactive demonstrations
- 📖 Comparison with Dcat Admin - Feature comparison
- 📖 Package Structure - Package architecture
- 📖 Documentation Structure - Documentation organization
- 📖 Future Improvements - Roadmap and planned features
Facade Usage
You can also use the Facade for quick access:
Artisan Command
Generate a custom filter class using the Artisan command:
This creates app/Filament/Filters/MyCustomFilter.php.
Options
| Option | Description | Default |
|---|---|---|
--type |
Filter type to extend | basic |
--force |
Overwrite existing file | false |
Available Types
| Type | Base Class |
|---|---|
basic |
Filament\Tables\Filters\Filter |
like |
LikeFilter |
in |
InFilter |
comparison |
ComparisonFilter |
boolean |
BooleanFilter |
null |
NullFilter |
enum |
EnumFilter |
range |
RangeFilter |
between |
BetweenFilter |
scope |
ScopeFilter |
regex |
RegexFilter |
fulltext |
FullTextFilter |
json |
JsonFilter |
date-component |
DateComponentFilter |
select-table |
SelectTableFilter |
modal-select |
ModalSelectFilter |
hidden |
HiddenFilter |
relative-date |
RelativeDateFilter |
cascading-select |
CascadingSelectFilter |
find-in-set |
FindInSetFilter |
input-mask |
InputMaskFilter |
geo-location |
GeoLocationFilter |
filter-group |
FilterGroup |
soft-delete |
SoftDeleteFilter |
exists |
ExistsFilter |
aggregate |
AggregateFilter |
column-compare |
ColumnCompareFilter |
advanced-json |
AdvancedJsonFilter |
timezone-date |
TimezoneAwareDateFilter |
morph-relation |
MorphRelationFilter |
Examples
Capability Matrix
Generate a capability matrix of all filters:
See the full capability matrix.
Testing
Code Quality
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
If you discover any security-related issues, please email [email protected].
Credits
- Cooper
- Inspired by Dcat Admin
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-dcat-filters with dependencies
filament/filament Version ^4.0 || ^5.0
spatie/laravel-package-tools Version ^1.9