access table repeater data

i have a table repeater and im trying to access the table repeater data. i have tried $data['nameOfRepeater'] but it says undefined array key.
6 Replies
LeandroFerreira
Does it work?
Actions\Action::make('report')
->slideOver()
->color('success')
->action(function ($data): void {
Notification::make()
->body(json_encode($data['stockArray']))
->send();
})
->form([
Repeater::make('stockArray')
->schema([
TextInput::make('name')
->label(__('Inventory')),
]),
]),
];
Actions\Action::make('report')
->slideOver()
->color('success')
->action(function ($data): void {
Notification::make()
->body(json_encode($data['stockArray']))
->send();
})
->form([
Repeater::make('stockArray')
->schema([
TextInput::make('name')
->label(__('Inventory')),
]),
]),
];
black ka1ser
black ka1serOP2y ago
nope same error Undefined array key "stockArray"
LeandroFerreira
where are you trying this code? Can you share the whole code please?
black ka1ser
black ka1serOP2y ago
this is the page ListInventories, where i need to create a button called closing or smth the button will open a slideover form, some of the fields in the form are populated using stockArray for the button's action(), i want to use data from the table repeater to save into model DailyStock
black ka1ser
black ka1serOP2y ago
the ui
Want results from more Discord servers?
Add your server