F
Filament4mo ago
Hitori

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
Hitori
Hitori4mo ago
Updated yes, did as was told in #✅┊rules
LeandroFerreira
LeandroFerreira4mo ago
php artisan about --only=Filament what is the filament version?
Hitori
Hitori4mo ago
No description
LeandroFerreira
LeandroFerreira4mo ago
No description
Hitori
Hitori4mo ago
I thought any 3.x was fine
Tieme
Tieme4mo ago
Docs are for lates releases, not a particular one.
Hitori
Hitori4mo ago
Understood, thank you!