post($regulation->formName())[$regulation->getIndex()] ?? null; if ($dataFromPost) { $regulation->is_confirmed = $dataFromPost['is_confirmed'] ?? 0; if ($regulation->hasChangedAttributes()) { if (!$regulation->save()) { throw new RecordNotValid($regulation); } $something_changed = true; } } } return $something_changed; } }