PHPackages                             jawabapp/laravel-gamify - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jawabapp/laravel-gamify

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jawabapp/laravel-gamify
=======================

Add gamification in laravel app with reputation point and badges support

1.0.9(4y ago)087MITPHPPHP &gt;=7.1.33

Since Nov 29Pushed 4y agoCompare

[ Source](https://github.com/jawabapp/laravel-gamify)[ Packagist](https://packagist.org/packages/jawabapp/laravel-gamify)[ Docs](https://github.com/jawabapp/laravel-gamify)[ RSS](/packages/jawabapp-laravel-gamify/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (4)Versions (13)Used By (0)

Laravel Gamify 🕹 🏆
------------------

[](#laravel-gamify--)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c411bd7c5cd8c126caaa7a7b06eb143101fd7c11d3d3a8f456d72889d87d3b46/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f71636f642f6c61726176656c2d67616d6966792e737667)](https://packagist.org/packages/qcod/laravel-gamify)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/46497d8c58f75ee9bd14b6d80cc9a53d31a9b851fa9ee60a3bb2e40c11f06901/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f71636f642f6c61726176656c2d67616d6966792f6d61737465722e737667)](https://travis-ci.org/qcod/laravel-gamify)[![Total Downloads](https://camo.githubusercontent.com/cfa33159914670a5898d220a9ae00b976f2e9e9432b6049c32a24b2ba7b2c690/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f71636f642f6c61726176656c2d67616d6966792e737667)](https://packagist.org/packages/qcod/laravel-gamify)

Use `jawabapp/laravel-gamify` to quickly add reputation point &amp; badges in your Laravel app.

### Installation

[](#installation)

**1** - You can install the package via composer:

```
$ composer require jawabapp/laravel-gamify
```

**2** - If you are installing on Laravel 5.4 or lower you will be needed to manually register Service Provider by adding it in `config/app.php` providers array.

```
'providers' => [
    //...
    Jawabapp\Gamify\GamifyServiceProvider::class
]
```

In Laravel 5.5 and above the service provider automatically.

publish the config file:

```
php artisan vendor:publish --provider="Jawabapp\Gamify\GamifyServiceProvider" --tag="config"

```

**3** - Now publish the migration for gamify tables:

```
php artisan vendor:publish --provider="Jawabapp\Gamify\GamifyServiceProvider" --tag="migrations"

```

*Note:* It will generate migration for `reputations`, `badges` and `user_badges` tables along with add reputation field migration for `users` table to store the points, you will need to run `composer require doctrine/dbal` in order to support dropping and adding columns.

```
php artisan migrate

```

If your payee (model who will be getting the points) model is `App\User` then you don't have to change anything in `config/gamify.php`.

### Getting Started

[](#getting-started)

**1.** After package installation now add the **Gamify** trait on `App\User` model or any model who acts as **user** in your app.

```
use Jawabapp\Gamify\Gamify;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    use Notifiable, Gamify;
```

⭐️ 👑 Reputation Point
---------------------

[](#️--reputation-point)

**2.** Next step is to create a point.

```
php artisan gamify:point PostCreated
```

It will create a PointType class named `PostCreated` under `app/Gamify/Points/` folder.

```
