PHPackages                             tizis/achievements - 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. tizis/achievements

ActiveLibrary

tizis/achievements
==================

1.1.2(4y ago)22309[1 issues](https://github.com/tizis/laravel-achievements/issues)MITPHPPHP ^7.1|^8.0

Since Apr 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/tizis/laravel-achievements)[ Packagist](https://packagist.org/packages/tizis/achievements)[ RSS](/packages/tizis-achievements/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

This package can be used to add interacts with achievements on any model you have in your application.

```
    "php": "^7.1|^8.0",
    "illuminate/support": "^8.0",

```

Install
-------

[](#install)

`composer require tizis/achievements`

### Publish Migrations &amp; Migrate

[](#publish-migrations--migrate)

```
php artisan vendor:publish --provider="tizis\achievements\Providers\ServiceProvider" --tag=migrations`
php artisan migrate

```

### Publish Config &amp; configure (optional)

[](#publish-config--configure-optional)

`php artisan vendor:publish --provider="tizis\achievements\Providers\ServiceProvider" --tag=config `

Examples
--------

[](#examples)

```
use tizis\achievements\Contracts\HasAchievements;
use tizis\achievements\Traits\InteractsWithAchievements;

class User extends Authenticatable implements HasAchievements {
	use InteractsWithAchievements;
}
```

### Example #1: Basic

[](#example-1-basic)

```
use App\Models\User;
use tizis\achievements\Entity\Achievement;
use tizis\achievements\Entity\Group;
use tizis\achievements\Entity\GroupNamespace;
use tizis\achievements\Services\GroupAchievementService;
...
$createdGroup = new Group([
    'title' => 'Running',
    'description' => 'Sport is cool',
    'hash' => 'sport_activities_running',
    'meta' => 'keywords or something like'
]);

$createdGroupNamespace = GroupNamespace::create(['title' => 'Activities']);
$createdGroupNamespace->groups()->save($createdGroup);

$createdGroup->achievements()->saveMany([
    new Achievement([
        'title' => 'Running: Beginner',
        'level' => 1,
        'description' => 'optional',
        'points' => '10', //to next level
        'value' => '1000' // it's just abstract achievement 'value'
    ]),
    new Achievement([
        'title' => 'Running: Pro',
        'level' => 2,
        'description' => 'optional',
        'points' => '100', //to next level
        'value' => '1000000' // it's just abstract achievement 'value'
    ])
]);

$user = User::where('id', 1)->first();

$service = new GroupAchievementService($user);
$service->addProgress($createdGroup, 20);
```

### Example #2: Basic 2

[](#example-2-basic-2)

```
use App\Models\User;
use tizis\achievements\Entity\Group;
use tizis\achievements\Services\GroupAchievementService;
...
$group = Group::where('hash', 'sport_activities_running')->firstOrFail();
$user = User::where('id', 1)->first();

$service = new GroupAchievementService($user);
$service->removeProgress($group, 20);
```

### Example #3: Achievement without group

[](#example-3-achievement-without-group)

```
use App\Models\User;
use tizis\achievements\Entity\Achievement;
use tizis\achievements\Services\AchievementService;
...
$createdSingleAchievement = Achievement::create([
    'title' => 'Running: Beginner',
    'level' => 1,
    'description' => 'optional',
    'points' => '100', //to next level
    'value' => '1000' // it's just abstract achievement 'value'
]);

$user = User::where('id', 1)->first();

$service = new AchievementService($user);
$service->addProgress($createdSingleAchievement, '100');
```

### Example #4: Helper

[](#example-4-helper)

```
use App\Models\User;
use tizis\achievements\AchievementHelper;
...
$user = User::where('id', 1)->first();

AchievementHelper::count($user); // return count of user's unlocked achievements
AchievementHelper::lastUnlockedAchievements($user, 100); // return last 100 unlocked achievements
AchievementHelper::lastUnlockedAchievement($user); // return last unlocked achievement
AchievementHelper::getUnlockedUniqueAchievementsOfUser($user); // return unlocked unique achievements (without group)
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Total

2

Last Release

1707d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8581135ba6b660790c9eb688b49bd620efa2b7c0bda6208c194cc3734c7c2704?d=identicon)[tizis](/maintainers/tizis)

---

Top Contributors

[![iooe](https://avatars.githubusercontent.com/u/16865573?v=4)](https://github.com/iooe "iooe (19 commits)")

---

Tags

achievementslaravel

### Embed Badge

![Health badge](/badges/tizis-achievements/health.svg)

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

###  Alternatives

[spatie/laravel-query-builder

Easily build Eloquent queries from API requests

4.4k26.9M220](/packages/spatie-laravel-query-builder)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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