ouch
ouch
FFilament
Created by ouch on 11/22/2023 in #❓┊help
How to show array key in TextColumn
Yeah $record works, thanks
9 replies
FFilament
Created by ouch on 11/22/2023 in #❓┊help
How to show array key in TextColumn
Yeah i tried it in the meantime however state gets me the value not the whole array and I'm confused 😅
Tables\Columns\TextColumn::make('variant_attributes_json')
->formatStateUsing(function ($state): string {
// dd($state);
if (!empty($state && is_array($state))) {
$key = key($state);
$value = $state[$key];
return $key . ' - ' . $value;
}
return $state;
})
Tables\Columns\TextColumn::make('variant_attributes_json')
->formatStateUsing(function ($state): string {
// dd($state);
if (!empty($state && is_array($state))) {
$key = key($state);
$value = $state[$key];
return $key . ' - ' . $value;
}
return $state;
})
9 replies
FFilament
Created by MRB_KILLER on 11/22/2023 in #❓┊help
filament adding a s to the name
Hi you have this property
protected static ?string $pluralLabel = 'Loonstrooks';
protected static ?string $pluralLabel = 'Loonstrooks';
8 replies