Projectslaravel-achievementsInstallation

Laravel Achievements

Package

Achievement and reputation system for Laravel applications.

Upgrade Guide

Installation

composer require bradietilley/laravel-achievements

Publish the config and migrations, then migrate:

php artisan vendor:publish --tag=achievements-config
php artisan vendor:publish --tag=achievements-migrations
php artisan migrate

User model

Implement the contracts and use the traits on whichever model should earn achievements (typically User):

use BradieTilley\Achievements\Concerns\HasAchievements;
use BradieTilley\Achievements\Concerns\HasReputation;
use BradieTilley\Achievements\Contracts\EarnsAchievements;
use BradieTilley\Achievements\Contracts\EarnsReputation;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable implements EarnsAchievements, EarnsReputation
{
    use HasAchievements;
    use HasReputation;
}

HasReputation is optional. Use it only if you want points alongside achievements.

Next steps

  • Usage — creating achievements, events, and manual grants
  • Examples — common achievement setups
  • Configuration — models, queues, and custom criteria