Modules\Doptor\TranslationManager\Controllers\Backend\LanguageManagerController::store PHP Method

store() public method

Store a newly created resource in storage.
public store ( ) : Response
return Response
    public function store()
    {
        $input = Input::all();
        try {
            TranslationLanguage::create($input);
            $this->language_service->createLanguage($input['code']);
            return Redirect::route("{$this->link_type}.modules.doptor.translation_manager.languages.index")->with('success_message', trans('success_messages.translate_lang_create'));
        } catch (ValidationException $e) {
            return Redirect::back()->withInput()->withErrors($e->getErrors());
        }
    }