Text column
TextColumn renders a value as text. It is sortable and filterable, and carries display modifiers for
the common value types a text cell holds.
TextColumn::make('name')->label('Name')->link('/people/{value}')->sortable();TextColumn::make('email')->label('Email')->link('mailto:{value}')->copyable();TextColumn::make('joined_at')->label('Joined')->date()->sortable();- actionsLabel:"Actions"
- bulkActions:[]
- data:[{"email":"[email protected]","joined_at":"2026-01-14 09:00:00","name":"Ada Lovelace"},{"email":"[email protected]","joined_at":"2026-02-03 12:30:00","name":"Alan Turing"}]
- emptyLabel:"No results"
- endpoint:null
- filters:[]
- layout:null
- lazy:null
- pagination:{"currentPage":null,"from":1,"hasMore":false,"lastPage":null,"mode":"none","nextPage":null,"perPage":null,"to":2,"total":2}
- resizableColumns:null
- resizeIndicator:false
- state:{"filters":[],"page":1,"perPage":25,"sorts":[],"tableFilters":[]}
- striped:null
- badge:null
- copyable:false
- date:null
- link:{"external":false,"href":"/people/{value}"}
- multiple:null
- badge:null
- copyable:true
- date:null
- link:{"external":false,"href":"mailto:{value}"}
- multiple:null
- badge:null
- copyable:false
- date:{"dateStyle":"medium","timeStyle":null}
- link:null
- multiple:null
Dates and times
Section titled “Dates and times”->date(), ->time(), and ->dateTime() format a date/time value for the viewer’s locale and
timezone. Pass a DateTimeStyle case — Short, Medium (the default),
Long, or Full — to control the style. A dated column filters as a date.
use Lattice\Lattice\Core\Enums\DateTimeStyle;
TextColumn::make('created_at')->date();TextColumn::make('updated_at')->dateTime(DateTimeStyle::Short);->link('/products/{value}') renders the value as a link; {value} is substituted with the cell
value. Pass external: true for an outbound link that opens in a new tab.
TextColumn::make('email')->link('mailto:{value}')->copyable();TextColumn::make('homepage')->link('{value}', external: true);Copyable
Section titled “Copyable”->copyable() adds a click-to-copy affordance to the cell.
TextColumn::make('api_token')->copyable();As a badge
Section titled “As a badge”->badge() renders the value as a coloured pill. The tone is read from a sibling field on the row —
->badge('status_color') reads the colour from status_color, defaulting to the color field.
For a fixed value-to-colour map instead, use a dedicated Badge column.
TextColumn::make('status')->badge('status_color');To-many relations
Section titled “To-many relations”->multiple('name') draws the value from a to-many relation named by the column key, reading name
from each related row and rendering the values as a list. It filters through the relation and is never
sortable — see relation columns.
TextColumn::make('tags')->multiple('name')->badge('color');