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