qcod/laravel-gamify
Add gamification to Laravel apps with reputation points and badges. Generate point types via Artisan, award points to users (or any model) using a simple trait, and manage reputations, badges, and user badges with provided migrations and config.
composer require qcod/laravel-gamifyphp artisan vendor:publish --provider="QCod\Gamify\GamifyServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="QCod\Gamify\GamifyServiceProvider" --tag="config"
php artisan migrate
Gamify trait to your user/payee model (e.g., App\User)php artisan gamify:point PostCreated
Then define payee(), points, and logic in the generated class.givePoint() into Eloquent events (created, updated, deleted) to automate point awards/revocations.getPoints() instead of using static $points for context-aware rewards (e.g., post length, engagement score).BadgeType classes—points changes trigger automatic badge checks and assignment.$user->reputations (a morphMany relation) for audit logs, analytics dashboards, or leaderboard backends.ReputationChanged events (fire on points update) to push real-time updates via Laravel Echo for live UI feedback.composer require doctrine/dbal before running migrations to avoid errors with column modifications.php artisan cache:forget gamify.badges.all
public $allowDuplicates = false in point classes to avoid accidental double-rewarding (e.g., same post edited multiple times).$payee = 'relation_name' shorthand when the subject model has a direct Eloquent relationship to the payee—avoids boilerplate payee() method.HasReputation trait + addPoint()/reducePoint() to skip storing reputation logs.user.reputation.{id}) defined in broadcast_on_private_channel and channel_name config.badge_icon_folder (default: images/badges/) with badge_icon_extension (default: .svg)—or override with explicit $icon in badge class.How can I help you explore Laravel packages today?