Exemplo n.º 1
0
 /**
  * Show the form for creating a new voting.
  *
  * @return Response
  */
 public function create()
 {
     $types = VoteType::lists('title', 'id');
     // Get all vote types for the form
     $objectives = VoteObjective::lists('title', 'id');
     // Get all vote objectives for the form
     return view('votings.create', compact('types', 'objectives'));
 }
Exemplo n.º 2
0
 /**
  * Remove the specified vote type from storage.
  *
  * @param  int  $id The id of the vote type to delete
  * @return Response
  */
 public function destroy($id)
 {
     // Find and delete vote type
     $vt = VoteType::findOrFail($id);
     $vt->delete();
     // Redirect
     Session::flash('message', 'Ο τύπος απάντησης διαγράφηκε με επιτυχία!');
     return Redirect::to('votetypes');
 }