Значение "count" постоянно меняется, нужно чтобы начальное значение было 50 и потом прибавлялось :)
public static function gamesToday()
{
return self::where('status', self::STATUS_FINISHED)->where('created_at', '>=', Carbon::today())->count();
}
public static function lastGame()
{
$game = self::orderBy('id', 'desc')->first();
$lastgame = $game->id-1;
return $lastgame;
}
public static function usersToday()
{
return count(\DB::table('games')
->join('bets', 'games.id', '=', 'bets.game_id')
->join('users', 'bets.user_id', '=', 'users.id')
->where('games.created_at', '>=', Carbon::today())
->groupBy('users.username')
->select('users.username')->get());