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')); }
public function postFunds() { $form = $this->uploadFundForm; $form->handleRequest(\Request::instance()); if ($form->isValid()) { $country = Utility::getCountryCodeByIP(); $blockedCountries = Setting::get('site.countriesCodesBlockedFromUploadFunds'); $blockedCountries = explode(',', $blockedCountries); if (in_array($country['code'], $blockedCountries)) { \Flash::error("Something went wrong!"); return Redirect::route('lender:funds')->withForm($form); } return $form->makePayment(); } \Flash::error("Entered Amounts are invalid!"); return Redirect::route('lender:funds')->withForm($form); }
public function getJoin() { $country = Utility::getCountryCodeByIP(); return View::make('lender.join', compact('country'), ['form' => $this->joinForm, 'facebookJoinUrl' => $this->facebookService->getLoginUrl('lender:facebook-join')]); }
public function getNestedData() { $data = $this->getData() + $this->borrower->getPersonalInformation(); return Utility::nestedArray($data); }
private function loadFromDb($locale, $group) { $labels = TranslationLabelQuery::create()->filterByLanguageCode($locale)->filterByFilename($group)->find()->toKeyValue('key', 'value'); $nestedLabels = Utility::nestedArray($labels, '.'); return $nestedLabels; }
public function getNestedData() { $data = $this->getData(); return Utility::nestedArray($data); }
public function getCountry() { $country = Utility::getCountryCodeByIP(); return View::make('borrower.join.country', compact('country'), ['form' => $this->countryForm]); }