PHPackages                             windomz/lottery-engine - 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. windomz/lottery-engine

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

windomz/lottery-engine
======================

A lottery component engine - modularity and easy to deploy.

v0.5.0(9y ago)220MITPHPPHP &gt;=7.0

Since Jun 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/WindomZ/lottery-engine)[ Packagist](https://packagist.org/packages/windomz/lottery-engine)[ RSS](/packages/windomz-lottery-engine/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (9)Versions (15)Used By (0)

lottery-engine
==============

[](#lottery-engine)

> A lottery component engine - modularity and easy to deploy.

[![Latest Stable Version](https://camo.githubusercontent.com/b207514081d5fb8ae303a3cdc0463e12fe7fe092db50e1c33287e93ff0681b4e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77696e646f6d7a2f6c6f74746572792d656e67696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/windomz/lottery-engine)[![Build Status](https://camo.githubusercontent.com/5fedc7b20a191b18f74a5cc8bd1ff54614e3212408f0abb2bb7f0d760ad90a61/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f57696e646f6d5a2f6c6f74746572792d656e67696e652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/WindomZ/lottery-engine)[![Minimum PHP Version](https://camo.githubusercontent.com/90eed33e7df559b70b174e97d37a4907946803c7ab691640166d2518d8cd2118/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e302d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Minimum MYSQL Version](https://camo.githubusercontent.com/f63dc8e0ec4da67b3c5f5a1bf276804cb3935e1539f7b4e2f29a7eea4c5f093d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d7973716c2d253345253344253230352e362d3434373961312e7376673f7374796c653d666c61742d737175617265)](https://www.mysql.com/)[![Platform](https://camo.githubusercontent.com/1b4c4f1b3ab1249b5de6009c78a178570086f1a1c11d7dd89444649eefd41056/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d4c696e75782532466d61634f532d6666363962342e7376673f7374796c653d666c61742d737175617265)](#readme)

[中文文档](https://github.com/WindomZ/lottery-engine/blob/master/README_Ch-zh.md#readme)

Feature
-------

[](#feature)

- Play - How to play
- Rule - The rule of playing
- Reward - Play rewards
- Record - Play records

Install
-------

[](#install)

Open the terminal in the project directory:

```
$ composer require windomz/lottery-engine
```

Create a configuration file, like `config.yml`:

```
database_host: 127.0.0.1
database_port: 3306
database_type: mysql
database_name: lotterydb
database_username: root
database_password: root
database_charset: utf8
database_logging: false
database_json: true # If the database supports JSON.
```

If only for quick testing, you can run `./sql/lotterydb.sql` in `MySQL` to quickly create a test database.

Of course, you can also customize the `database name` based on `./sql/lotterydb.sql`, but note that the `table name` *CANNOT MODIFY*!

In the project initialization, load the specified configuration file through the following implementation:

```
Lottery::setConfigPath('./config.yml');
```

Usage
-----

[](#usage)

Refer to the [Document](https://windomz.github.io/lottery-engine)(*Currently only Chinese*) for details.

Limitation
----------

[](#limitation)

> There is no memory cache system, such as `Memcached`, `Redis`, but through `shmop` functions to share memory operations, this brings some performance bottlenecks, if necessary, can fork and rewrite `\LotteryEngine\Model\Cache` class to access.

License
-------

[](#license)

The [MIT License](https://github.com/WindomZ/lottery-engine/blob/master/LICENSE)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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 ~1 days

Total

13

Last Release

3287d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a89e55638a85fe172818182bdad8edf91f4b14452af84537d49e795b9f2108fd?d=identicon)[WindomZ](/maintainers/WindomZ)

---

Top Contributors

[![WindomZ](https://avatars.githubusercontent.com/u/14875359?v=4)](https://github.com/WindomZ "WindomZ (140 commits)")

---

Tags

componentlottery-enginemodulephp7lotteryengine

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k77.4k89](/packages/pocketmine-pocketmine-mp)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M526](/packages/shopware-core)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

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