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')
|
||||
|
||||
Generated
+3
-3
@@ -13404,12 +13404,12 @@
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {},
|
||||
"stability-flags": [],
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^8.3"
|
||||
},
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.9.0"
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
Reference in new issue
Block a user