{"repo":"qcod/laravel-gamify","free":true,"listed":false,"github":"https://github.com/qcod/laravel-gamify","clone":"git clone https://github.com/qcod/laravel-gamify.git","description":"Gamify your Laravel app with Reputation Points & Achievements Badges support","language":"PHP","stars":679,"topics":["laravel","badges","achievements","reputation","gamification"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Laravel Gamify 🕹 🏆 Use qcod/laravel-gamify to quickly add reputation point &amp; badges in your Laravel app. Installation 1 - You can install the package via composer: 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. In Laravel 5.5 and above the service provider automatically. 3 - Now publish the migration for gamify tables: 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. You can publish the config file: 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 1. After package installation now add the Gamify trait on App\\User model or any model who acts as user in your app. ⭐️ 👑 Reputation Point 2. Next step is to create a point. It will create a PointType class named PostCreated under app/Gamify/Points/ folder. Give point to User Now in your Controller where a Post is created you can give points like this: Undo a given point In some cases you would want to undo a given point, for example, a user deletes his post. You can also pass second argument as $user in helper function givePoint(new PostCreated($post), $user) , default is auth()- user(). Pro Tip 👌 You could also ","default_branch":null,"files":null,"tree":[],"storefront":"/r/qcod","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/qcod/laravel-gamify/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}