Example #1
0
 public function buyticket()
 {
     $lottery_id = $_GET['lottery_id'];
     $baseURL = '../../public/';
     $user = Auth::user()->id;
     $checkTicket = Lottery::checkBuyTicket($lottery_id, $user);
     if (empty($checkTicket)) {
         Lottery::buyLotteryTicket($lottery_id, $user);
     } else {
         Lottery::buyticket($lottery_id, $user);
     }
     $currentLotteryJackpot = Lottery::getCurrentJackpot($lottery_id);
 }