F
Filament10mo 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
HitoriOP10mo ago
Updated yes, did as was told in #✅┊rules
LeandroFerreira
LeandroFerreira10mo ago
php artisan about --only=Filament what is the filament version?
Hitori
HitoriOP10mo ago
No description
LeandroFerreira
LeandroFerreira10mo ago
No description
Hitori
HitoriOP10mo ago
I thought any 3.x was fine
Tieme
Tieme10mo ago
Docs are for lates releases, not a particular one.
Hitori
HitoriOP10mo ago
Understood, thank you!
Want results from more Discord servers?
Add your server