本文整理汇总了PHP中Evento::with方法的典型用法代码示例。如果您正苦于以下问题:PHP Evento::with方法的具体用法?PHP Evento::with怎么用?PHP Evento::with使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Evento
的用法示例。
在下文中一共展示了Evento::with方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addtocart
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');
}
示例2: publico
/**
* 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');
}
示例3: eliminar
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');
}