Пример #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'));
 }
Пример #2
0
 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);
 }
Пример #3
0
 public function getJoin()
 {
     $country = Utility::getCountryCodeByIP();
     return View::make('lender.join', compact('country'), ['form' => $this->joinForm, 'facebookJoinUrl' => $this->facebookService->getLoginUrl('lender:facebook-join')]);
 }
Пример #4
0
 public function getNestedData()
 {
     $data = $this->getData() + $this->borrower->getPersonalInformation();
     return Utility::nestedArray($data);
 }
Пример #5
0
 private function loadFromDb($locale, $group)
 {
     $labels = TranslationLabelQuery::create()->filterByLanguageCode($locale)->filterByFilename($group)->find()->toKeyValue('key', 'value');
     $nestedLabels = Utility::nestedArray($labels, '.');
     return $nestedLabels;
 }
Пример #6
0
 public function getNestedData()
 {
     $data = $this->getData();
     return Utility::nestedArray($data);
 }
Пример #7
0
 public function getCountry()
 {
     $country = Utility::getCountryCodeByIP();
     return View::make('borrower.join.country', compact('country'), ['form' => $this->countryForm]);
 }