Files
nuhodds_fi4/app/Filament/Resources/Bookmakers/Tables/BookmakersTable.php
T
2026-01-04 05:41:37 +01:00

45 lines
1.4 KiB
PHP

<?php
namespace App\Filament\Resources\Bookmakers\Tables;
use App\Filament\Tables\Columns\BookmakerIcon;
use Filament\Actions\EditAction;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\ToggleColumn;
use Filament\Tables\Filters\TernaryFilter;
use Filament\Tables\Table;
class BookmakersTable
{
public static function configure(Table $table): Table
{
return $table
->striped()
->columns([
TextColumn::make('name')
->searchable(),
BookmakerIcon::make('icon')->label('Icon'),
TextColumn::make('baid')
->label('BAID')
->numeric()
->sortable(),
ToggleColumn::make('txso')->offColor('gray'),
ToggleColumn::make('txot')->offColor('gray'),
ToggleColumn::make('betsapi')->offColor('gray'),
ToggleColumn::make('direct')->offColor('gray'),
ToggleColumn::make('is_active')->offColor('gray'),
])
->defaultSort('name')
->filters([
TernaryFilter::make('txso'),
TernaryFilter::make('txot'),
TernaryFilter::make('betsapi'),
TernaryFilter::make('direct'),
TernaryFilter::make('is_active')->default(true),
])
->recordActions([
EditAction::make(),
]);
}
}