F
Filament13mo ago
Haven

How to render JSON in an Infolists?

I was reading the documentation and came across a KeyValueEntry field, however, my laravel application is complaining saying that KeyValueEntry doesn't exist within Filament\Infolists\Components
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Infolists\Components\TextEntry::make('name'),
Infolists\Components\IconEntry::make('active')
->boolean(),
Infolists\Components\TextEntry::make('slug'),
Infolists\Components\TextEntry::make('type'),
Infolists\Components\TextEntry::make('created_at')
->dateTime(),
Infolists\Components\TextEntry::make('updated_at')
->dateTime(),
Infolists\Components\KeyValueEntry::make('settings')
]);
}
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Infolists\Components\TextEntry::make('name'),
Infolists\Components\IconEntry::make('active')
->boolean(),
Infolists\Components\TextEntry::make('slug'),
Infolists\Components\TextEntry::make('type'),
Infolists\Components\TextEntry::make('created_at')
->dateTime(),
Infolists\Components\TextEntry::make('updated_at')
->dateTime(),
Infolists\Components\KeyValueEntry::make('settings')
]);
}
Here's the code I'm dealing with currently
8 Replies
Haven
HavenOP13mo ago
Updated yes, did as was told in #✅┊rules
LeandroFerreira
LeandroFerreira13mo ago
php artisan about --only=Filament what is the filament version?
Haven
HavenOP13mo ago
No description
LeandroFerreira
LeandroFerreira13mo ago
No description
Haven
HavenOP13mo ago
I thought any 3.x was fine
Tieme
Tieme13mo ago
Docs are for lates releases, not a particular one.
Haven
HavenOP13mo ago
Understood, thank you!

Did you find this page helpful?