public function addtocart() { if (Input::get('order') == 1) { $group = Input::get('team'); $id = Input::get('event'); $qty = Input::get('qty'); $e = Evento::with('club')->whereId(Input::get('event'))->firstOrFail(); if (!$group == 1) { $item = array('id' => $e->id . $group, 'name' => $e->name . ' - Player Registration', 'price' => $e->fee, 'quantity' => $qty, 'tax' => 0, 'org_name' => $e->club->name, 'org_id' => $e->club->id, 'event' => $e->id, 'player_id' => ''); Cart::insert($item); } else { $item = array('id' => $e->id . $group, 'name' => $e->name . ' - Team Registration', 'price' => $e->group_fee, 'quantity' => $qty, 'tax' => 0, 'org_name' => $e->club->name, 'org_id' => $e->club->id, 'event' => $e->id, 'player_id' => ''); Cart::insert($item); } } return Redirect::action('PaymentController@index'); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function publico($id) { $e = Evento::with('club')->whereId($id)->firstOrFail(); $eval = Evento::validate($id); $event = Evento::find($id); $title = 'League Together - ' . $e->name . ' Event'; return View::make('pages.public.event')->with('page_title', $title)->withEvent($e)->with('valid', $eval)->with('message', 'message flash here'); }
public function eliminar($idEve) { $vdt = new Validate\QuickValidator(array($this, 'notFound')); $vdt->test($idEve, new Validate\Rule\NumNatural()); $evento = Evento::with(['contenido', 'comentarios.votos'])->findOrFail($idEve); $usuarios = $evento->usuarios()->lists('usuario_id'); $evento->delete(); $log = UserlogCtrl::createLog('delEventoo', $this->session->user('id'), $evento); NotificacionCtrl::createNotif($usuarios, $log); $this->flash('success', 'El evento ha sido eliminado exitosamente.'); $this->redirectTo('shwIndex'); }