PHPackages                             owlgrin/wallet - 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. owlgrin/wallet

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

owlgrin/wallet
==============

Easy to plug wallet system in any app

v2.1.0(10y ago)121064[14 issues](https://github.com/owlgrin/wallet/issues)PHPPHP &gt;=5.4.0

Since Apr 9Pushed 10y ago4 watchersCompare

[ Source](https://github.com/owlgrin/wallet)[ Packagist](https://packagist.org/packages/owlgrin/wallet)[ RSS](/packages/owlgrin-wallet/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

wallet
======

[](#wallet)

Wallet allows you to maintain credits for your users.

Installation
============

[](#installation)

To install the package, include the following in your composer.json.

```
"owlgrin/wallet": "dev-master"

```

And then include the following service provider in your app.php.

```
'Owlgrin\Wallet\WalletServiceProvider'

```

And lastly, publish the config.

```
php artisan config:publish owlgrin/wallet

```

Usage
=====

[](#usage)

Write this command in your artisan to create migrations

```
php artisan wallet:table

```

Now migrate all the tables to your mysql db

```
php artisan migrate

```

You can initiate wallet by writing

```
Wallet::user($userId)

```

where `$userId` is the unique id of your user

Credits

You can add credits of your user

```
Wallet::credits($credits, $redemptions)

```

where `$credits` is the amount of credits you want to add for your user and `$redemptions` is number of times you want your user to use these credits

Redemptions

You can redeem the credits by using

```
Wallet::redeem($amount)

```

where `$amount` is the requested amount on which you want to access the credit

Left Credits

You can see the left credits by using

```
Wallet::left();

```

Exceptions

Wallet comes with custom exceptions, to make them easier to handle. These are the followin custom exceptions that you can use:

```
Owlgrin\Wallet\Exceptions\CreditsLimitReachedException;
Owlgrin\Wallet\Exceptions\NoCreditsException;
Owlgrin\Wallet\Exceptions\InternalException;
```

Each of these extend an abstract class `Owlgrin\Wallet\Exceptions\Exception`.

You can use it like following:

```
try
{
	Wallet::Redeem(5445);
}
catch(Owlgrin\Wallet\Exceptions\NoCreditsException $e)
{
	return $e;
}
catch(Owlgrin\Wallet\Exceptions $e)
{
	return $e;
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 73.1% 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 ~13 days

Total

5

Last Release

4004d ago

Major Versions

v0.1.1 → v1.02015-04-13

v1.0 → v2.0.02015-05-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4389133?v=4)[Owlgrin](/maintainers/owlgrin)[@owlgrin](https://github.com/owlgrin)

---

Top Contributors

[![sahilsarpal15](https://avatars.githubusercontent.com/u/13375245?v=4)](https://github.com/sahilsarpal15 "sahilsarpal15 (38 commits)")[![mohitmamoria](https://avatars.githubusercontent.com/u/2756694?v=4)](https://github.com/mohitmamoria "mohitmamoria (12 commits)")[![Mayank009](https://avatars.githubusercontent.com/u/5304281?v=4)](https://github.com/Mayank009 "Mayank009 (2 commits)")

### Embed Badge

![Health badge](/badges/owlgrin-wallet/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9346.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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