add image to elements tabel
This commit is contained in:
1 parent
05066810a4
commit
0b3315615c
2 files changed
+8
-3
No files matched your search
@@ -20,6 +20,7 @@ use Filament\Forms\Components\Select;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\ImageColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Enums\FiltersLayout;
|
||||
use Filament\Tables\Filters\Filter;
|
||||
@@ -33,6 +34,7 @@ class ElementsTable
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('id'),
|
||||
IconColumn::make('sport.icon')
|
||||
->label('')
|
||||
->grow(false)
|
||||
@@ -47,6 +49,9 @@ class ElementsTable
|
||||
->icon(fn ($record) => $record->country->icon),
|
||||
TextColumn::make('element_group.competition_group.name')->label('Competition Group'),
|
||||
// TextColumn::make('element_group.group.name')->label('Group'),
|
||||
ImageColumn::make('betsapi_image_id')
|
||||
->label('')
|
||||
->defaultImageUrl(fn ($state) => url('https://assets.b365api.com/images/team/m/'.$state.'.png')),
|
||||
TextColumn::make('name')->searchable(),
|
||||
])->filters([
|
||||
SelectFilter::make('sport_id')
|
||||
|
||||
Reference in new issue
Block a user