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
mvenghaus3mo ago
you can use formatStateUsing with $get
thyk123
thyk1233mo ago
Hi! Thank you again for responding my question! could you give me an example, i really appriciate that!
Solution
LeandroFerreira
LeandroFerreira3mo 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
mvenghaus3mo ago
string -> int
thyk123
thyk1233mo 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
More Posts