Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $gamesToday = Jackpot::where('status', 3)->where('created_at', '>=', Carbon::today())->count();
- $jackpot = Jackpot::where('status', 3)->max('bank');
- $jackpotToday = Jackpot::where('created_at', '>=', Carbon::today())->max('bank');
- $userToday = count(\DB::table('jackpot')
- ->join('jackpot_bets', 'jackpot.id', '=', 'jackpot_bets.game_id')
- ->join('users', 'jackpot_bets.user_id', '=', 'users.vk_id')
- ->where('jackpot.created_at', '>=', Carbon::today())
- ->groupBy('users.name')
- ->select('users.name')->get());
- $response = [
- 'gamesToday' => $gamesToday,
- 'jackpot' => number_format($jackpot, 0, '.', ' '),
- 'userToday' => $userToday,
- 'jackpotToday' => number_format($jackpotToday, 0, '.', ' ')
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement