Download the PHP package particle-academy/laravel-fun-lab without Composer
On this page you can find all versions of the php package particle-academy/laravel-fun-lab. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download particle-academy/laravel-fun-lab
More information about particle-academy/laravel-fun-lab
Files in particle-academy/laravel-fun-lab
Package laravel-fun-lab
Short Description Analytics-driven gamification layer for Laravel applications. Track user engagement through awards, achievements, and prizes.
License MIT
Informations about the package laravel-fun-lab
Laravel Fun Lab
Analytics disguised as gamification — turn user activity into meaningful engagement insights.
Laravel Fun Lab (LFL) is an analytics-driven gamification layer for Laravel applications. Track user engagement through XP, achievements, and prizes while capturing structured activity data that apps normally never track.
For agents. This package is listed on the Fancy MCP catalog server at
https://ui.particle.academy/mcp(streamable HTTP, no API key; MCP idfancy-ui), with install commands and docs, alongside the rest of the kit. How an agent installs and uses this package is in AGENTS.md.
Features
- 🎯 Event-Driven Architecture - Every action, reward, or update is an observable event
- 🎮 GamedMetrics XP System - Create independent XP buckets with automatic level progression
- 📊 MetricLevelGroups - Combine multiple XP metrics with weights for composite leveling
- 🏆 Achievements - Define and grant achievements with auto-unlock on level-up
- 🎁 Prizes - Reward users with virtual or physical prizes
- 📈 Built-in Analytics - Query aggregate engagement data for behavioral insights
- 🔌 Extensible - Macros, hooks, and custom implementations
- ⚡ Drop-In Simple - Install → Track → Award workflow
Installation
Quick Start
1. Add the Awardable Trait
Add the Awardable trait to any model you want to gamify:
The Awardable trait gives your model a Profile that tracks XP, achievements, and prizes.
2. Create GamedMetrics (XP Categories)
GamedMetrics are independent XP buckets. Each metric tracks its own XP and levels:
3. Define Levels for Metrics
Levels are XP thresholds that can auto-unlock achievements:
4. Award XP
Award XP using the fluent award() method:
5. Create and Grant Achievements
6. Create and Grant Prizes
7. Check Level Progress
8. Create Metric Level Groups
Combine multiple metrics with weights for composite leveling:
9. Leaderboards
API Summary
| Method | Purpose |
|---|---|
LFL::setup() |
Create GamedMetrics, MetricLevels, MetricLevelGroups, Achievements, Prizes |
LFL::award($metric) |
Award XP to a GamedMetric (fluent builder) |
LFL::grant($slug) |
Grant an Achievement or Prize (fluent builder) |
LFL::hasLevel($user, $level, metric: or group:) |
Check if user has reached a level |
LFL::profile($user) |
Get the user's gamification profile |
LFL::leaderboard() |
Build leaderboard queries |
LFL::analytics() |
Build analytics queries |
Documentation
- Usage Guide - Examples and patterns
- API Reference - PHP facade + REST API documentation
- React / SPA Integration - Auth contract, CORS, Echo, typed clients
- Broadcasting - Real-time event channels and payloads
- Configuration - All configuration options
- Extending - Custom implementations and hooks
Requirements
- PHP 8.4+
- Laravel 13.x
License
MIT License - see LICENSE for details.
⭐ Star Fancy Dev Kit
If this package is useful to you, a quick ⭐ on the repo really helps us build a better kit. Thank you!
All versions of laravel-fun-lab with dependencies
illuminate/contracts Version ^13.0
illuminate/database Version ^13.0
illuminate/events Version ^13.0
illuminate/http Version ^13.0
illuminate/routing Version ^13.0
illuminate/support Version ^13.0
illuminate/validation Version ^13.0
laravel/framework Version ^13.0
symfony/yaml Version ^6.4.50|^7.4.23|^8.1.11