PHPackages                             panigale/laravel5-point-system - 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. panigale/laravel5-point-system

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

panigale/laravel5-point-system
==============================

1.1.0.9(2y ago)0910PHPPHP &gt;=7.0.0CI failing

Since Feb 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Panigale/laravel5-Points)[ Packagist](https://packagist.org/packages/panigale/laravel5-point-system)[ RSS](/packages/panigale-laravel5-point-system/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (49)Used By (0)

Laravel5 Point System
=====================

[](#laravel5-point-system)

Install
-------

[](#install)

```
composer require panigale/laravel5-point-system

php artisan vendor:publish --provider="Panigale\PointSystemServiceProvider"

```

migrate point tables

```
php artisan migrate

```

功能
--

[](#功能)

```
use Illuminate\Foundation\Auth\User as Authenticatable;
use Panigale\Point\Traits\HasRoles;

class User extends Authenticatable
{
    use HasPoints;

    // ...
}

```

可以自定義點數的名目，例如：

建立一個點數項目名為 event:1，並且這個點數將在 $expiryDateTime 過期

Create Point Rule
-----------------

[](#create-point-rule)

```
PointRoles::create(‘event:1’ ,$expiryDateTime)

```

add Points
----------

[](#add-points)

並將點數賦予給 user

```
$user->addPoints('event:1' ,$numbers)

```

usage Point
-----------

[](#usage-point)

將點數從 user 身上扣除

```
$user->usagePoint('event:1' ,$numbers)

or

$user->usagePoint([
	'point1' => 200,
	'point2' => 300
])

```

會取出所有未過期的點數，如果沒有指定什麼種類扣除，將會自動依照建立順序進行扣除（先進先出）

current Points
--------------

[](#current-points)

取得使用者目前所有可用點數

```
$currentPoints = $user-> currentPoints()
$event1Point = $currentPoints->even_1

```

all Points
----------

[](#all-points)

取得使用者目前的所有點數（包含不可用）

```
$points = $user->allPoints()

```

enoughToUsePoint
----------------

[](#enoughtousepoint)

點數是否足夠使用

```
$user->enoughToUsePoint([
	'一般點數' => 200,
	'紅利點數' => 500
])

or

$user->enoughToUsePoint(200)

```

migration
---------

[](#migration)

1. point\_rules
2. points
3. point\_usages

License
-------

[](#license)

Skeleton is released under the [MIT License](LICENSE).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

Established project with proven stability

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

Recently: every ~446 days

Total

48

Last Release

1009d ago

Major Versions

0.1.23 → 1.02018-04-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d09ab4349fa6d3766eb5479986760f643968ffe46b1a345490dcc92c3adaa1e?d=identicon)[Panigale](/maintainers/Panigale)

---

Top Contributors

[![Panigale](https://avatars.githubusercontent.com/u/5546128?v=4)](https://github.com/Panigale "Panigale (50 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/panigale-laravel5-point-system/health.svg)

```
[![Health](https://phpackages.com/badges/panigale-laravel5-point-system/health.svg)](https://phpackages.com/packages/panigale-laravel5-point-system)
```

###  Alternatives

[rinvex/countries

Rinvex Countries is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.

1.7k7.4M48](/packages/rinvex-countries)[pinkary-project/type-guard

Type Guard module is part of the Pinkary Project, and allows you to \*\*narrow down the type\*\* of a variable to a more specific type.

198102.4k14](/packages/pinkary-project-type-guard)[lingaro/magento2-codegen

Magento 2 Code Generator

966.5k](/packages/lingaro-magento2-codegen)

PHPackages © 2026

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