本文整理汇总了PHP中Club::Find方法的典型用法代码示例。如果您正苦于以下问题:PHP Club::Find方法的具体用法?PHP Club::Find怎么用?PHP Club::Find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Club
的用法示例。
在下文中一共展示了Club::Find方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: error
public function error($param, $id, $playerid)
{
setlocale(LC_MONETARY, "en_US");
$club = Club::Find($id);
$user = Auth::user();
$player = Player::find($playerid);
$query = array('report_type' => 'customer_vault', 'customer_vault_id' => $user->profile->customer_vault, 'club' => $club->id);
$payment = new Payment();
$vault = json_decode(json_encode($payment->ask($query)), false);
//convert object to array
$dt = json_decode(json_encode($param), false);
//clean duplicates from array
//$club = array_unique($club);
//cart content
$items = Cart::contents();
$data = array('data' => $dt, 'vault' => $vault, 'products' => $items, 'club' => $club, 'player' => $player);
$mail = Mail::send('emails.receipt.error', $data, function ($message) use($user, $club) {
$message->to($user->email, $user->profile->firstname . ' ' . $user->profile->lastname)->subject("Payment Declined | {$club->name}");
foreach ($club->users()->get() as $value) {
$message->bcc($value->email, $club->name)->subject("Payment Declined - {$club->name}");
}
});
return $mail;
}
示例2: PaymentRemoveCartItem
public function PaymentRemoveCartItem($club, $id)
{
$club = Club::Find($club);
$event = Evento::Find($id);
// Clean the cart
Cart::destroy();
return Redirect::action('ClubPublicController@selectPlayer', array($club->id, $event->id));
}