PHP code example of leek / filament-header-filters
1. Go to this page and download the library: Download leek/filament-header-filters library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
leek / filament-header-filters example snippets
use Filament\Resources\Pages\ListRecords;
use Leek\FilamentHeaderFilters\Concerns\HasHeaderFilters;
class ListOrders extends ListRecords
{
use HasHeaderFilters;
}
use App\Enums\OrderStatus;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Filters\SelectFilter;
TextColumn::make('status')
->badge()
->headerFilter(
SelectFilter::make('status')
->options(OrderStatus::class)
->native(false)
)