86 lines
2.9 KiB
PHP
86 lines
2.9 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Clusters\Maintenance\Resources\Events\Tables;
|
|
|
|
use Filament\Actions\BulkActionGroup;
|
|
use Filament\Actions\DeleteBulkAction;
|
|
use Filament\Actions\EditAction;
|
|
use Filament\Tables\Columns\IconColumn;
|
|
use Filament\Tables\Columns\TextColumn;
|
|
use Filament\Tables\Table;
|
|
|
|
class EventsTable
|
|
{
|
|
public static function configure(Table $table): Table
|
|
{
|
|
return $table
|
|
->columns([
|
|
IconColumn::make('sport_id')
|
|
->label('')
|
|
->icon(function ($record): string {
|
|
return $record->sport->icon;
|
|
}),
|
|
TextColumn::make('starttime')->dateTime('M j, Y H:i')->sortable(),
|
|
IconColumn::make('liga')
|
|
->label('')
|
|
->icon(function ($record): string {
|
|
return 'flag-country-'.$record->liga->country->iso2;
|
|
}),
|
|
TextColumn::make('liga.name')->searchable(),
|
|
TextColumn::make('home.name')->searchable(),
|
|
TextColumn::make('away.name')->searchable(),
|
|
// TextColumn::make('prid')
|
|
// ->numeric()
|
|
// ->sortable(),
|
|
// TextColumn::make('txid')
|
|
// ->numeric()
|
|
// ->sortable(),
|
|
// TextColumn::make('brid')
|
|
// ->numeric()
|
|
// ->sortable(),
|
|
// TextColumn::make('baid')
|
|
// ->numeric()
|
|
// ->sortable(),
|
|
// TextColumn::make('cnid')
|
|
// ->numeric()
|
|
// ->sortable(),
|
|
// TextColumn::make('grid')
|
|
// ->numeric()
|
|
// ->sortable(),
|
|
// TextColumn::make('cgid')
|
|
// ->numeric()
|
|
// ->sortable(),
|
|
// TextColumn::make('hoid')
|
|
// ->numeric()
|
|
// ->sortable(),
|
|
// TextColumn::make('awid')
|
|
// ->numeric()
|
|
// ->sortable(),
|
|
// TextColumn::make('liga')
|
|
// ->searchable(),
|
|
|
|
// TextColumn::make('away')
|
|
// ->searchable(),
|
|
TextColumn::make('created_at')
|
|
->dateTime()
|
|
->sortable()
|
|
->toggleable(isToggledHiddenByDefault: true),
|
|
TextColumn::make('updated_at')
|
|
->dateTime()
|
|
->sortable()
|
|
->toggleable(isToggledHiddenByDefault: true),
|
|
])
|
|
->filters([
|
|
//
|
|
])
|
|
->recordActions([
|
|
EditAction::make(),
|
|
])
|
|
->toolbarActions([
|
|
BulkActionGroup::make([
|
|
DeleteBulkAction::make(),
|
|
]),
|
|
]);
|
|
}
|
|
}
|