Exemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(InscriptionRequest $request)
 {
     $colloque = $this->colloque->find($request->input('colloque_id'));
     $inscription_no = $this->colloque->getNewNoInscription($colloque->id);
     // Prepare data
     $data = $request->all() + ['inscription_no' => $inscription_no];
     $inscription = $this->inscription->create($data);
     // Update counter
     $colloque->counter = $colloque->counter + 1;
     $colloque->save();
     event(new InscriptionWasRegistered($inscription));
     return redirect('colloque')->with(array('status' => 'success', 'message' => 'Nous avons bien pris en compte votre inscription, vous recevrez prochainement une confirmation par email.'));
 }
Exemplo n.º 2
0
 public function store(InscriptionRequest $request)
 {
     $user = $this->userRepository->store($request->all());
     return redirect('user')->withOk("L'utilisateur " . $user->name . " a été créé.");
 }