Пример #1
0
 public function postTranslations($filename, $languageCode)
 {
     if (!in_array($languageCode, $this->languageCodes)) {
         \App::abort(404, 'Given language not found.');
     }
     $fileExists = $this->translationService->fileExists($filename);
     if (!$fileExists) {
         \App::abort(404, 'Given file not found.');
     }
     $data = Utility::fromInputNames(Input::all());
     $this->translationService->updateTranslations($filename, $languageCode, $data);
     \Flash::success('Your updates have been saved.');
     return Redirect::action('TranslationController@getTranslations', compact('filename', 'languageCode'));
 }