PHPackages                             chapdel/laravel-credit - 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. chapdel/laravel-credit

ActiveLibrary

chapdel/laravel-credit
======================

Model credits system for Laravel.

1.3.0(4y ago)3131MITPHPPHP ^8.0

Since Nov 5Pushed 4y agoCompare

[ Source](https://github.com/chapdel/laravel-credits)[ Packagist](https://packagist.org/packages/chapdel/laravel-credit)[ Docs](https://github.com/chapdel/laravel-credit)[ GitHub Sponsors](https://github.com/chapdel)[ RSS](/packages/chapdel-laravel-credit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (12)Versions (7)Used By (0)

Model credits system for laravel
================================

[](#model-credits-system-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f03e6c2d640c4586198bbdf27913c264c1ff2bee6e180710c0597718ab1075ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368617064656c2f6c61726176656c2d6372656469742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chapdel/laravel-credit)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3a0dc4edc4d408be48b923057578956864a0140b402382ac88bba0176e3395d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6368617064656c2f6c61726176656c2d637265646974732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/chapdel/laravel-credits/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ccfe56c2ddb3552a9651784da9e8af2c5a1d1eff36826e82699f0a7870a48184/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368617064656c2f6c61726176656c2d6372656469742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chapdel/laravel-credit)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require chapdel/laravel-credit
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="Chapdel\Credit\CreditServiceProvider" --tag="laravel-credit-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Chapdel\Credit\CreditServiceProvider" --tag="laravel-credit-config"
```

This is the contents of the published config file:

```
return [
    "initial" => 0
];
```

Usage
-----

[](#usage)

### Traits

[](#traits)

```
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Chapdel\Credits\Traits\HasCredits;

class User extends Authenticatable
{
    use HasCredits;
}
```

### Interactions

[](#interactions)

#### init credits

[](#init-credits)

```
$user = User::find(1);
$user->initCredits();
```

#### Add credits

[](#add-credits)

```
$user = User::find(1);
$user->addCredits(500);
```

#### Deducting credits

[](#deducting-credits)

```
$user = User::find(1);
$user->deductCredits(50);
```

#### Update credits

[](#update-credits)

```
$user = User::find(1);
$user->deductCredits(100);
```

#### Getting credits

[](#getting-credits)

```
$user = User::find(1);
$user->credit;
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Chapdel KAMGA](https://github.com/chapdel)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

6

Last Release

1650d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20987014?v=4)[Chapdel KAMGA](/maintainers/chapdel)[@chapdel](https://github.com/chapdel)

---

Top Contributors

[![chapdel](https://avatars.githubusercontent.com/u/20987014?v=4)](https://github.com/chapdel "chapdel (3 commits)")

---

Tags

laravelcreditschapdellaravel-credit

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/chapdel-laravel-credit/health.svg)

```
[![Health](https://phpackages.com/badges/chapdel-laravel-credit/health.svg)](https://phpackages.com/packages/chapdel-laravel-credit)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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