43 lines
1.3 KiB
PHP
43 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\CompetitionGroups\Tables;
|
|
|
|
use Filament\Tables\Columns\IconColumn;
|
|
use Filament\Tables\Columns\SelectColumn;
|
|
use Filament\Tables\Columns\TextColumn;
|
|
use Filament\Tables\Table;
|
|
|
|
class CompetitionGroupsTable
|
|
{
|
|
public static function configure(Table $table): Table
|
|
{
|
|
return $table
|
|
->columns([
|
|
IconColumn::make('sport.icon')
|
|
->label('')
|
|
->grow(false)
|
|
->color('primary')
|
|
->width(30)
|
|
->icon(fn ($record) => $record->sport->icon)
|
|
->tooltip(fn ($record) => $record->id)
|
|
->visibleFrom('lg'),
|
|
TextColumn::make('country.name')
|
|
->wrap()
|
|
->color('gray')
|
|
->label('Event')
|
|
->icon(fn ($record) => $record->country->icon),
|
|
SelectColumn::make('level')
|
|
->options([
|
|
'top' => 'Top Level',
|
|
'medium' => 'Medium Level',
|
|
'base' => 'Basic Level',
|
|
]),
|
|
TextColumn::make('name'),
|
|
|
|
])
|
|
->filters([
|
|
//
|
|
]);
|
|
}
|
|
}
|