F
Filament9mo ago
KeyMe

Access repeater item value from outside

I tried to use $get('repeaterName') to access a repeater and gets below array:
array:1 [▼ // app/Filament/Resources/OrderResource.php:374
"d014ab83-5d0f-4ecf-a585-4f9582ffe4d9" => array:2 [▼
"addon_id" => "15"
"quantity" => null
]
]
array:1 [▼ // app/Filament/Resources/OrderResource.php:374
"d014ab83-5d0f-4ecf-a585-4f9582ffe4d9" => array:2 [▼
"addon_id" => "15"
"quantity" => null
]
]
Is there a way to change the array key name to something simpler?
1 Reply
Robin
Robin4mo ago
this is probably a decade later but anyway, using
$values = array_values($get('repeaterName'));
$values = array_values($get('repeaterName'));
should have fixed it by returning numeric keys
Want results from more Discord servers?
Add your server