Add-on inside feature:Gifts
Lucky Gifts
A special gift type: the sender may win back coins worth a multiple of the price.
By نبيل الطرابلسيFirst published Dec 1, 2026
About this add-on
A special gift type: the sender may win back coins worth a multiple of the price.
What it does
- Users send a "lucky gift" at any place that offers them (a post, a reel and more), often several at once as a combo. The result decides whether they win and how much (a multiple of what they paid).
- Prizes are paid from one shared pool, and the platform's and host's shares come from the owner's settings. Beginner protection, a daily cap and return-rate rules keep the economy balanced.
- The dashboard has win/loss reports, an economy settings page, a winning-sound threshold, and a live monitor for the pool.
Depends on
The Gifts feature (it sits on top of sending gifts), the wallet (charging and refunding).
In the app
Swipe for more
Install and remove
After you buy, you'll also find these commands in My purchases.
Install
php artisan feature:install lucky --applyIf the feature isn't installed, this command installs it too.
Remove (your data stays)
Disable the add-on in the base with one command (shown on this page). Lucky gifts disappear from the app and normal gifts keep working untouched. Pool balances, history and reports stay stored and come back with the add-on.
php artisan feature:remove luckyRequired features
Install one of these features first: this add-on works inside it.
Install and remove
The command sets up the feature's tables, admin panel pages, permissions, settings, and base data. In the app, the feature appears in its place on its own. The feature disappears from the app and the admin panel, and your data stays. Install it again and everything comes back as it was.
After you buy, you'll also find these commands in My purchases.
Install
php artisan feature:install lucky --applyIf the feature isn't installed, this command installs it too.
Remove (your data stays)
Disable the add-on in the base with one command (shown on this page). Lucky gifts disappear from the app and normal gifts keep working untouched. Pool balances, history and reports stay stored and come back with the add-on.
php artisan feature:remove luckyUse this feature inside yours
الخلاصة بصراحة: الحظ مابيقدّمش port للغير. اللي تقدر تعمله: تقرا نتايج الجولات (f_lucky__rounds) أو تسمع بانر الفوز. أي حاجة تانية ملك الإضافة وماتتنادّاش من برّه.
التثبيت والإزالة
- تثبيت:
php artisan feature:install lucky --apply(الهدايا لازم تكون متركّبة)، وتفتحه بـphp artisan feature:open lucky. إزالة:php artisan feature:remove lucky --apply. - اعتماداتها:
gifts@^1،base:users@1.
الـports (سيرفر)
- اللي الإضافة بتقدّمه للغير: مفيش port. هي بتستهلك سجلّات الهدايا والأساس (
PanelSlots(coin_report.tab),ProfitSources). - ماتناديش
LuckyRoundServiceولاLuckyPoolمن ميزتك: الجولة والبركة والدفتر ترانزاكشن واحدة بترتيب أقفال معروف، ونداء من برّه يكسر الحفظ.
الأحداث
- اللي الإضافة بتطلّعه: إعلان الفوز الكبير بيروح للمكان (
LuckyPlace::announce)؛ هو اللي بيقرر الشكل والقناة. - اللي بتسمعه: مفيش.
الداتا اللي تقدر تقراها
f_lucky__roundsبالموديلModules\LuckyGifts\Entities\LuckyRound(للقراية بس):user_id,gift_id,hits,unit_bet,bet_total,win_total,app_cut,host_cut,created_at.- إيراد التطبيق من الحظ معروض في
ProfitSourcesوفي دفتر الكوينز.
Slots (التطبيق)
إضافة التطبيق lucky (of: gifts) بتسجّل أوفرلاي الفوز وبانر الفوز وصوت الفوز، وتتشال مع الإضافة من غير ما تكسر شاشة الهدايا.
مثال سيرفر: ميزة بتعرض ربح مستخدم من الحظ
use Modules\LuckyGifts\Entities\LuckyRound;
// صفر لو الإضافة مش متركّبة (الجدول فاضي)، ماتشغّلش كتابة هنا
$won = LuckyRound::where('user_id', $user->id)->sum('win_total');اعمل إضافة جوّه الميزة دي
مفيش إضافات جوّه lucky،. لو عايز تعمل إضافة جديدة للهدايا اتبع نموذج lucky نفسه (قسم «اعمل إضافة جوّه الميزة دي» في Modules/Gifts/FEATURE.md): kind: addon وparent: gifts وrequires: ["base:users@1", "gifts@^1"]. ولو عايز تغيّر في توزيع الفوز نفسه فده تعديل على lucky مش إضافة عليها.
الإعدادات والصلاحيات والمنيو
- مفاتيح
settings:stop_luckyGift(قديم: مبقاش بيقرّره حد؛ المفتاح الوحيد دلوقتي كارتluckyفي ميزات التطبيق، والمايجريشن2026_11_29_100000بتقفل الكارت على السيرفر اللي كان فيهstop_luckyGift=1وبتسيب المفتاح القديم زي ما هو)، وlucky_reject_client_result_frames(قفل افتراضيًا)، وlucky_gift_coins(عتبة إعلان الفوز الكبير)، وبتتحفظ بـSettingsService. - جدول
f_lucky__settings: نسب الجولة وحدودها (lucky_app_share,lucky_host_share,lucky_pool_marginبالـbps، وlucky_cover_limit,lucky_pool_capبالكوينز، وlucky_shortfall_breaker، ومفاتيحlucky_welcome_*)، بتتعدّل من صفحةlucky-gift-settings. من غير مفتاح: التطبيق 1%، المضيف 10%، الهامش صفر (اللاعبين بياخدوا 89%). - الصلاحيات (legacy، تصنيف
Gift):browse-lucky-gift-setting(بتحمي ورقة التقرير وقسم الإعدادات)، وedit-lucky-gift-setting. - المنيو: ورقة «Lucky Gifts Reports» (
lucky-gift-reports) جوّه قسم «Gifts» (اللي الهدايا بتملكه). - اللوحة: شاشات
lucky-gift-reports(+/top)،lucky-gift-settings.
What's new
2.1.1Released Dec 1, 2026By نبيل الطرابلسي
- Release 2.1.1 (signed build 56fedcf)