Пример #1
0
 public function postForm(UpdateRegistrationRequest $request)
 {
     $registration = registrar();
     if (!$registration->step->edit_form) {
         return redirect()->route('registration.registrar.index');
     }
     $input = $request->all();
     $old_email = $registration->contact_email;
     $registration->fill($input);
     if (empty($input['passeport_country_id'])) {
         $registration->passeport_country_id = NULL;
     }
     if ($registration->save()) {
         if ($old_email != $registration->contact_email) {
             event(new RegistrationEmailChanged($registration));
         }
         /** check for extra degrees and store them */
         $this->saveExtraDegrees($input, $registration->id);
         /** end check for extra degrees */
         event(new RegistrationUpdated($registration));
         event(new RegistrationStepChanged($registration));
         return redirect()->back()->with('success', trans('registration::registrar.profile_change_success'));
     } else {
         return redirect()->back()->with('error', trans('registration::registrar.profile_change_error'));
     }
 }
Пример #2
0
 public function postForm(UpdateRegistrationRequest $request)
 {
     $registration = daress_registerd();
     $input = $request->all();
     $registration->fill($input);
     if ($registration->save()) {
         /** check for extra degrees and store them */
         $this->saveExtraDegrees($input, $registration->id);
         /** end check for extra degrees */
         event(new RegistrationUpdated($registration));
         event(new RegistrationStepChanged($registration));
         return redirect()->back()->with('success', trans('registration::registrar.profile_change_success'));
     } else {
         return redirect()->back()->with('error', trans('registration::registrar.profile_change_error'));
     }
 }