public function organization_info_update(UpdateOrganizationInfoFormRequest $request, $id)
 {
     $updateOrganization = new UpdateOrganizationInfo($request, $id);
     $this->dispatch($updateOrganization);
     Flash::overlay('Organization Info Updated!');
     return redirect()->back();
 }
 /**
  * Create a new Larabook user
  * @param SaveUserRequest $request
  * @return string
  */
 public function store(SaveUserRequest $request)
 {
     $user = $this->dispatchFrom(RegisterUserJob::class, $request);
     Auth::login($user);
     Flash::overlay("Glad to have you as a new Larabook member!");
     return redirect(route('home'));
 }
 /**
  * @param Requests\SignUpRequest $request
  * @param CommandDispatcher $commandDispatcher
  *
  * @return
  */
 public function store(Requests\SignUpRequest $request, CommandDispatcher $commandDispatcher)
 {
     $commandDispatcher->dispatchFrom(RegisterUser::class, $request);
     \Auth::login(User::where('username', $request['username'])->first());
     Flash::overlay('Welcome!!');
     return Redirect::home();
 }
 public function store()
 {
     $this->registrationForm->validate(Input::all());
     $user = $this->execute(RegisterUserCommand::class);
     Auth::login($user);
     Flash::overlay('WELCOME! Glad to have you as a new Larabook member!');
     return Redirect::home();
 }
示例#5
0
 public function register(Request $request)
 {
     $validator = $this->validator($request->all());
     if ($validator->fails()) {
         $this->throwValidationException($request, $validator);
     }
     Auth::login($this->create($request->all()));
     Flash::overlay('Votre compte a bien été crée !', 'Bienvenue');
     return redirect($this->redirectPath());
 }
 public function update(PasswordChangeRequest $request, $id)
 {
     $check = auth()->validate(['email' => Auth::user()->email, 'password' => $request->input('current_password')]);
     if (!$check) {
         return redirect()->back()->withErrors('Current Password is incorrect.');
     }
     $userId = Auth::user()->id;
     $password = $request->input('new_password');
     $job = new SetPassword($userId, $password);
     $this->dispatch($job);
     Flash::overlay('Password successfully changed!');
     return redirect()->back();
 }
 public function confirm($verification_token)
 {
     if (!$verification_token) {
         throw new Exception("Invalid Confirmation Code", 1);
     }
     $user = User::where('verification_token', '=', $verification_token)->first();
     if (!$user) {
         throw new Exception("Invalid Confirmation Code", 1);
     }
     $user->status = 'active';
     $user->verification_token = null;
     $user->save();
     Flash::overlay('You have successfully verified your account.', 'Congratulations');
     return redirect('auth/login');
 }
 /**
  * Display Registration Page
  * @param  [type] $id [description]
  * @return [type]     [description]
  */
 public function getRegistration($id)
 {
     $event = $this->eventRepo->findById($id);
     $hostOrg = $this->orgRepo->findById($event->organization_id);
     $partners = $event->partners()->get();
     $partners->prepend($hostOrg);
     $partners->prepend('');
     $organizations = $partners->lists('name', 'id');
     $states = States::all();
     $grades = Grades::all();
     $genders = Gender::all();
     $languages = Languages::all();
     $sweatshirt_sizes = SweatshirtSizes::all();
     if ($event->private) {
         Flash::overlay('Note: This is a private event.  Your email must be on the guest list to process registration.');
     }
     return view('public.events.registration', compact('event', 'organizations', 'states', 'languages', 'grades', 'sweatshirt_sizes', 'genders'));
 }
 public function sendRegistrationConfirmation($id)
 {
     $attendee = $this->attendees->findById($id);
     $event = $attendee->event()->first();
     $this->dispatch(new SendRegistrationConfirmation($attendee, $event));
     Flash::overlay('Registration confirmation sent!');
     return redirect()->back();
 }
 public function sitioReparacion()
 {
     Flash::overlay('Bien! su mensaje se envio correctamente');
     return Redirect::to('/');
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(ProdutoRequest $request)
 {
     Produto::create($request->all());
     Flash::overlay("Produto adicionado!", 'Mensagem');
     return \Redirect::route('cadastro.produtos.index');
 }
 public function sendRegistrationConfirmation($id)
 {
     $user = $this->users->findById($id);
     $this->dispatch(new SendWelcomeEmail($user));
     Flash::overlay('Confirmation email resent!');
     return redirect()->back();
 }
 public function updateamount(Request $request, $id)
 {
     $validator = Validator::make(Input::all(), Expensive::$rules);
     if ($validator->passes()) {
         $project = Project::find($id);
         $viatico = new Expensive();
         $viatico->project_id = $project->id;
         $viatico->concepto = Input::get('concepto');
         $viatico->monto = Input::get('monto');
         $viatico->fecha = Input::get('fecha');
         /*
          * validar si existe una imagen
          */
         if (Input::has('file')) {
             $user = Input::get('user_id');
             $projectnumber = $project->id;
             $file = $request->file('file');
             $ruta = '/files/' . $user . '/' . $projectnumber . '/';
             $nombre = sha1(Carbon::now()) . '.' . $file->guessExtension();
             $fileupload = $file->move(getcwd() . $ruta, $nombre);
             $viatico->ruta = $fileupload;
         }
         $viatico->save();
         /*
          * movimiento en la tabla de proyecto para el monto restante
          */
         $monto = Input::get('monto');
         DB::table('projects')->where('id', $id)->update(['montocambiante' => $monto]);
         DB::table('projects')->where('id', $id)->decrement('montorestante', $monto);
         Flash::overlay('Amount Updated Successfully');
         return redirect('projects');
     }
     return redirect('projects/' . $id . '/uamount')->withErrors($validator)->withInput(Input::all())->with('message', 'There some problems with the inputs, please review and submit again :D !!');
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $item
  * @return Response
  */
 public function destroy($item)
 {
     $item->delete();
     Flash::overlay('Your items/service has been deleted.', 'Done!');
     return redirect('items');
 }
 public function unpublish($id)
 {
     $attendees = $this->attendees->findAllThatPaid($id, 'firstname', 'asc');
     if (!$attendees->isEmpty()) {
         Flash::overlay('This event cannot be taken offline; registered attendees exist for this event.');
         return redirect()->back();
     }
     $event = $this->eventRepo->findById($id);
     $event->published = false;
     $event->save();
     return redirect()->back();
 }