count how many item on repeater

How to count how many item that already create to user in laravel filament? Please help me! Thank you very much!
Solution:
```php Placeholder::make('repeater_count') ->content(fn (Get $get): string => count($get('repeater'))), Repeater::make('repeater') ->schema([...
Jump to solution
6 Replies
mvenghaus
mvenghaus9mo ago
you can use formatStateUsing with $get
thyk123
thyk123OP9mo ago
Hi! Thank you again for responding my question! could you give me an example, i really appriciate that!
Solution
LeandroFerreira
LeandroFerreira9mo ago
Placeholder::make('repeater_count')
->content(fn (Get $get): string => count($get('repeater'))),
Repeater::make('repeater')
->schema([
TextInput::make('field')
])
Placeholder::make('repeater_count')
->content(fn (Get $get): string => count($get('repeater'))),
Repeater::make('repeater')
->schema([
TextInput::make('field')
])
?
mvenghaus
mvenghaus9mo ago
string -> int
thyk123
thyk123OP9mo ago
Thank you sou much @laradev @mvenghaus, you people are so nice! May your day bless! one more! question, where can i learn craft function like that? i still dont understand to make the function like that @mvenghaus @Leandro Ferreira
Want results from more Discord servers?
Add your server