TextColumn relation first item

->columns([ Tables\Columns\TextColumn::make('users') ]) ->filters([ how can i get first item in TextColumn ??
4 Replies
jkbcoder
jkbcoderOP15mo ago
how the query should be ?? the $state return string
LeandroFerreira
LeandroFerreira15mo ago
you can use $record ->formatStateUsing(fn ($record): string => $record->users[0]->name ?? '')
jkbcoder
jkbcoderOP15mo ago
it work , thank you .
Want results from more Discord servers?
Add your server