public function postManage($language_id, $group) { $language = TranslationLanguage::findOrFail($language_id); $input = Input::all(); unset($input['_token']); foreach ($input as $key => $value) { $translation = Translation::where('locale', $language->code)->where('key', $key)->first(); if ($translation) { $value = str_replace('**script**', '<script>', $value); $value = str_replace('**/script**', '</script>', $value); $translation->value = $value; $translation->save(); } } $this->translation_manager->exportTranslations($group); return Redirect::route("{$this->link_type}.modules.doptor.translation_manager.index", [$language_id])->with('success_message', 'The translations were changed.'); }