F
Filament10mo ago
lutek

how to fill image on full card box (stacked)

is this possible without touching blade templates?
->columns([
Tables\Columns\Layout\Stack::make([
Tables\Columns\SpatieMediaLibraryImageColumn::make('photos')
->collection(config('project.project_media_collections.photos'))
->conversion('thumb')
->size('100%')
->limit(1),
Tables\Columns\TextColumn::make('title'),
Tables\Columns\ToggleColumn::make('favorite')
->updateStateUsing(function (Project $record) {
if ($record->favorite()->count() === 0) {
$record->favorite()->attach(auth()->id());
} else {
$record->favorite()->detach(auth()->id());
}
}),
Tables\Columns\TextColumn::make('favorite_count')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('rating_avg')
->numeric()
->sortable(),
])->alignBetween(),
])
->columns([
Tables\Columns\Layout\Stack::make([
Tables\Columns\SpatieMediaLibraryImageColumn::make('photos')
->collection(config('project.project_media_collections.photos'))
->conversion('thumb')
->size('100%')
->limit(1),
Tables\Columns\TextColumn::make('title'),
Tables\Columns\ToggleColumn::make('favorite')
->updateStateUsing(function (Project $record) {
if ($record->favorite()->count() === 0) {
$record->favorite()->attach(auth()->id());
} else {
$record->favorite()->detach(auth()->id());
}
}),
Tables\Columns\TextColumn::make('favorite_count')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('rating_avg')
->numeric()
->sortable(),
])->alignBetween(),
])
No description
Solution:
Check the Curator plugin. It’s doing similar with a grid layout.
Jump to solution
5 Replies
awcodes
awcodes10mo ago
It is possible, but you’ll need a custom column.
lutek
lutekOP10mo ago
Can i get some tips?
Solution
awcodes
awcodes10mo ago
Check the Curator plugin. It’s doing similar with a grid layout.
awcodes
awcodes10mo ago
GitHub
filament-curator/src/Resources/MediaResource.php at 3.x · awcodes/f...
A media picker plugin for Filament Panels. Contribute to awcodes/filament-curator development by creating an account on GitHub.
awcodes
awcodes10mo ago
GitHub
filament-curator/resources/views/components/tables/grid-column.blad...
A media picker plugin for Filament Panels. Contribute to awcodes/filament-curator development by creating an account on GitHub.
Want results from more Discord servers?
Add your server