Ercogx
Ercogx
FFilament
Created by Ercogx on 6/14/2024 in #❓┊help
Many attribute calls for RepeatableEntry
I have an attribute in the model that returns an array
public function getMetaAttribute(): array
{
info('call');

return [
[
'title' => 'Title 1',
'description' => 'Description 1',
],
[
'title' => 'Title 2',
'description' => 'Description 2',
],
[
'title' => 'Title 3',
'description' => 'Description 3',
],
];
}
public function getMetaAttribute(): array
{
info('call');

return [
[
'title' => 'Title 1',
'description' => 'Description 1',
],
[
'title' => 'Title 2',
'description' => 'Description 2',
],
[
'title' => 'Title 3',
'description' => 'Description 3',
],
];
}
I show this information on Viewing records
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Infolists\Components\RepeatableEntry::make('meta')
->schema([
Infolists\Components\TextEntry::make('title'),
Infolists\Components\TextEntry::make('description'),
])
]);
}
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Infolists\Components\RepeatableEntry::make('meta')
->schema([
Infolists\Components\TextEntry::make('title'),
Infolists\Components\TextEntry::make('description'),
])
]);
}
It all works, but in the logs I see the call message 14 times with one page load. Is this a bug or am I doing something wrong?
2 replies