Skip to content

SanchayaColumn Table Column ​

Display polymorphic media files directly inside your Filament Table using SanchayaColumn. It automatically resolves images attached via HasSanchayaFiles.

php
use DP0\Sanchaya\Tables\Columns\SanchayaColumn;

Single Avatar Column

php
SanchayaColumn::make('avatar')
    ->label('User Avatar')
    ->sanchayaGroup('avatar')
    ->circular();

Stacked Multi-Image Gallery Column

php
SanchayaColumn::make('gallery')
    ->label('Images')
    ->sanchayaGroup('gallery')
    ->multiple()
    ->stacked()
    ->limit(3)
    ->limitedRemainingText();

Method Reference

MethodDescription
sanchayaGroup(?string $group)Attachment group to resolve from the record. Defaults to column name.
multiple(bool $condition = true)Display all attached images in the group.
single()Display only the first image in the group.
circular(bool $condition = true)Render images with rounded circular borders.
stacked(bool $condition = true)Stack multiple images with overlap.
limit(int $limit)Cap the number of visible avatars in the stack.
limitedRemainingText()Display "+N" badge for remaining hidden images.

Released under the MIT License.