Repeater::make('parents')
->registerListeners([
'repeater::deleteItem' => [
function (Component $component, string $statePath, string $uuidToDelete): void {
....
if() {
}else{
Notification::make()
->title('Unable to delete this parent')
->body('The application must have at least 1 parent.')
->danger()
->send();
}
}
]
])
Repeater::make('parents')
->registerListeners([
'repeater::deleteItem' => [
function (Component $component, string $statePath, string $uuidToDelete): void {
....
if() {
}else{
Notification::make()
->title('Unable to delete this parent')
->body('The application must have at least 1 parent.')
->danger()
->send();
}
}
]
])