/**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(PartecipantRequest $request, Partecipant $partecipant)
 {
     $input = $request->all();
     $partecipant->update(['nome' => $input['nome'], 'cognome' => $input['cognome'], 'email' => $input['email'], 'telefono' => $input['telefono']]);
     if ($request->ajax() || $request->wantsJson()) {
         return new JsonResponse($partecipant);
     }
     flash()->success('aggiornato con successo!');
     return redirect('partecipants');
 }