公告: 旧版文档请移步 -> http://v2.laravel-filament.cn/docs

Languages

Version

Theme

Table Builder - Columns

Tags column

Tags columns render a list of tags from an array:

use Filament\Tables\Columns\TagsColumn;
 
TagsColumn::make('tags')

Be sure to add an array cast to the model property:

use Illuminate\Database\Eloquent\Model;
 
class Post extends Model
{
protected $casts = [
'tags' => 'array',
];
 
// ...
}

Using a separator

Instead of using an array, you may use a separated string by passing the separator into separator():

use Filament\Tables\Columns\TagsColumn;
 
TagsColumn::make('tags')->separator(',')
Edit on GitHub

Still need help? Join our Discord community or open a GitHub discussion