save()) { throw new \RuntimeException('Saving error.'); } } public function remove(Language $language): void { if (!$language->delete()) { throw new \RuntimeException('Removing error.'); } } public function clearDefaults() { Language::updateAll(['default' => 0]); } }