PHPackages                             ernestdefoe/giveaways - 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. ernestdefoe/giveaways

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

ernestdefoe/giveaways
=====================

Run provably-fair giveaways and raffles on your Flarum 2 forum — earn-entries engine, scheduled auto-draws, winner notifications.

v0.2.1(1mo ago)099MITPHP

Since Jun 6Pushed 1mo agoCompare

[ Source](https://github.com/ernestdefoe/giveaways)[ Packagist](https://packagist.org/packages/ernestdefoe/giveaways)[ RSS](/packages/ernestdefoe-giveaways/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Giveaways
=========

[](#giveaways)

[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](./LICENSE)[![Latest Stable Version](https://camo.githubusercontent.com/337206e8c95974b75715226aadfeb69a56dab93d9a4851fd5e808a1111229da3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65726e6573746465666f652f6769766561776179732e737667)](https://packagist.org/packages/ernestdefoe/giveaways)

Run **provably-fair giveaways** on your [Flarum](https://flarum.org) community. Members enter with one click, earn bonus entries for being active, and winners are drawn automatically — with a published seed and entrant fingerprint anyone can verify.

[![status](https://camo.githubusercontent.com/2779b97ed2ddf3a6c72ae88b3b157a733d11bd6719dda4f58d3e7629d8b4799d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d4d56502d363963366239)](https://camo.githubusercontent.com/2779b97ed2ddf3a6c72ae88b3b157a733d11bd6719dda4f58d3e7629d8b4799d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d4d56502d363963366239)

[![Giveaways page](docs/img/index.png)](docs/img/index.png)

Features
--------

[](#features)

- 🎁 **Beautiful giveaways page** — a dedicated `/giveaways` page with cards, live countdowns, status badges and entrant counts.
- 🎟️ **One-click entry** — registered members enter instantly. The button shows their current entry count.
- ⭐ **Earn-entries engine** — grant a one-time bonus when entrants post in the community, rewarding real activity.
- 🗂️ **Categories** — organise giveaways into colour-coded categories with filter pills, badges and an inline manager.
- 🎯 **Eligibility rules** — optionally require a minimum post count or account age to enter.
- ⏱️ **Scheduled auto-draw** — set an end time and the winners are drawn automatically by the scheduler. Hosts can also **draw now** at any time.
- 🔔 **Winner notifications** — every winner gets an in-app alert linking straight to the giveaway.
- 📦 **Prize claiming** — winners get a "You won!" banner with a one-click **Claim** button; the host is notified and can see per-winner claim status, plus optional claim instructions (e.g. "DM me your address").
- 🛡️ **Provably fair** — every draw publishes a random **seed** and a **SHA-256 hash** of the full entrant list, so the result is independently reproducible and tamper-evident.
- 🏆 **Multiple winners** — draw any number of weighted winners in a single fair pass.
- 🔐 **Granular permissions** — separate *enter*, *create own*, and *manage all* permissions.

Screenshots
-----------

[](#screenshots)

### Giveaway page — enter, requirements &amp; live countdown

[](#giveaway-page--enter-requirements--live-countdown)

[![Giveaway detail](docs/img/detail.png)](docs/img/detail.png)

### Provably-fair results — published winners, seed &amp; entrant hash

[](#provably-fair-results--published-winners-seed--entrant-hash)

[![Drawn giveaway with winners and fairness data](docs/img/winners.png)](docs/img/winners.png)

Installation
------------

[](#installation)

```
composer require ernestdefoe/giveaways
```

Then enable **Giveaways** in your admin panel and review the permissions grid.

> **Scheduled draws require Flarum's scheduler to be running.** Add this to your server's crontab:
>
> ```
> * * * * * cd /path/to/flarum && php flarum schedule:run >> /dev/null 2>&1
>
> ```
>
>
>
> Without it, giveaways won't auto-draw at their end time — but you can still draw manually from each giveaway page.

Updating
--------

[](#updating)

```
composer update ernestdefoe/giveaways
php flarum migrate
php flarum cache:clear
```

How the fair draw works
-----------------------

[](#how-the-fair-draw-works)

When a giveaway is drawn:

1. The full entrant list is serialized in a fixed order (`userId:entries`, sorted by user id) and hashed with **SHA-256** — this is the **entrant hash**.
2. A random **seed** is generated.
3. For each winner slot *i*, the winner is chosen by `SHA-256(seed:i)` reduced over the weighted entry pool, removing each winner before the next pick.

Because the seed and entrant hash are published on the giveaway page, anyone can re-run the algorithm and confirm the winners were not manipulated.

Permissions
-----------

[](#permissions)

PermissionDefaultDescription`giveaways.enter`MembersEnter giveaways`giveaways.create`AdminsCreate and manage **own** giveaways`giveaways.manage`AdminsManage **all** giveawaysSettings
--------

[](#settings)

- **Show a "Giveaways" link in the main navigation** — toggle the nav item.
- **Navigation label** — customise the link text.

License
-------

[](#license)

[MIT](./LICENSE) © ernestdefoe

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity27

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

Total

5

Last Release

46d ago

### Community

Maintainers

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

---

Top Contributors

[![ernestdefoe](https://avatars.githubusercontent.com/u/24905286?v=4)](https://github.com/ernestdefoe "ernestdefoe (9 commits)")

---

Tags

extensionflarumrafflecontestsweepstakesgiveaway

### Embed Badge

![Health badge](/badges/ernestdefoe-giveaways/health.svg)

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

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1938.7k](/packages/flarum-lang-french)[fof/masquerade

User profile builder extension for your Flarum forum.

2025.4k6](/packages/fof-masquerade)[fof/sitemap

Generate a sitemap

1799.7k2](/packages/fof-sitemap)[flarum/gdpr

Features for GDPR, PII management

1338.8k22](/packages/flarum-gdpr)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1034.8k7](/packages/fof-discussion-language)

PHPackages © 2026

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