PHPackages                             tigo/lottery - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tigo/lottery

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tigo/lottery
============

Gerador de números aleatórios para jogos de loteria

v0.0.3(4y ago)13583MITPHPPHP &gt;= 7.0

Since Apr 16Pushed 4y ago2 watchersCompare

[ Source](https://github.com/tigoCaval/Lottery-Br)[ Packagist](https://packagist.org/packages/tigo/lottery)[ Fund](https://www.paypal.com/donate/?hosted_button_id=4XKSCN658G2WU)[ Fund](https://www.paypal.com/donate?hosted_button_id=E84APX2Q5Y6XE)[ RSS](/packages/tigo-lottery/feed)WikiDiscussions main Synced 5d ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Number generator for lottery games
==================================

[](#number-generator-for-lottery-games)

Main lottery games in Brazil (Mega-Sena, Quina, Lotomania and Lotofácil), random number generator.

You also have the option to generate another type of game, with a standard method

- This package can be used with any PHP application or Frameworks/PHP.
- Download package: `composer require tigo/lottery`
- MIT license. ***Feel free to use this project***. ***Leave a star ⭐ or make a fork !***

*If you found this project useful, consider making a donation to support the developer.*

[![paypal](https://camo.githubusercontent.com/1c212254bf14c516a7571bbb8b8a1679967080453a6ba3a222491e973b6877dd/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f70745f42522f42522f692f62746e2f62746e5f646f6e61746543435f4c472e676966)](https://www.paypal.com/donate/?hosted_button_id=4XKSCN658G2WU)[![paypal](https://camo.githubusercontent.com/e1ff554a09e8e92bef25abc553ff05b88f45afd695877cf12f3a46558ef65b2e/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e61746543435f4c472e676966)](https://www.paypal.com/donate?hosted_button_id=E84APX2Q5Y6XE)

Introduction
------------

[](#introduction)

Somewhere in your project, you may need to use autoload

```
include __DIR__ ."/vendor/autoload.php";
```

Example: using the number generator for lottery games in Brazil

```
 use Tigo\Lottery\LotteryBr; //import class

 $game = new LotteryBr();

 /**
   First parameter: Choose the number of numbers you want to play.
   Second parameter: Number of tickets you want to play.
   return: array [][].
 **/
 $game->megaSena(6,2);
 $game->quina(5,2);
 $game->lotoFacil(15,2);
 $game->lotoMania(50,2);
 $game->superSete(7,2);
```

Example: Generating random numbers and the **Mega-Sena** ticket quantity

```
   print_r($game->megaSena(6,2));
   /**result:
   [
     [0]=> [07,17,31,32,40,47]
     [1]=> [10,23,35,37,39,40]
   ]
   **/
```

Example: Generating other types of games

```
  use Tigo\Lottery\LotteryPattern; // import class
  $pattern = new LotteryPattern();

  /**
   Building the random draw rule
   First parameter:  minimum = 20
   Second parameter: maximum = 30
   [20,21,22,23,24,25,26,27,28,29,30]
  **/

  print_r($pattern->makeGame(20, 30, 3, 2));

   /**result:
   [
     [0]=> [20,21,26]
     [1]=> [26,27,29]
   ]
   **/
```

### Supporting this project

[](#supporting-this-project)

If you are interested in supporting this project, you can help in many ways. Leave a star ⭐ or make a donation of any value.

### Contributors

[](#contributors)

- [list of contributors](https://github.com/tigoCaval/Lottery-Br/graphs/contributors)

### License

[](#license)

MIT license. See the archive [License](https://github.com/tigoCaval/Lottery-Br/blob/main/LICENSE)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

3

Last Release

1815d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f4b80fc9ba8d77c8b32d353d540dbd116ca6402f693e132aa7b1c21c15db39f?d=identicon)[tigopereira](/maintainers/tigopereira)

---

Top Contributors

[![tigoCaval](https://avatars.githubusercontent.com/u/19934116?v=4)](https://github.com/tigoCaval "tigoCaval (16 commits)")

---

Tags

lotofacillotomanialotterylottery-gamemega-senapowerballquinarandom-number-generatorslotteryloterialottery gamesmegasenaquinalotofacillotomaniasuper sete

### Embed Badge

![Health badge](/badges/tigo-lottery/health.svg)

```
[![Health](https://phpackages.com/badges/tigo-lottery/health.svg)](https://phpackages.com/packages/tigo-lottery)
```

###  Alternatives

[santigarcor/laravel-vuetable

Vuetable laravel backend package

2750.3k](/packages/santigarcor-laravel-vuetable)[bitbag/product-bundle-plugin

Product bundle for Sylius.

2174.4k](/packages/bitbag-product-bundle-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
