PHPackages                             owlgrin/throttle - 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/throttle

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

owlgrin/throttle
================

Rate Limiter and Usage tracker

v0.2.0(11y ago)2372[8 issues](https://github.com/owlgrin/throttle/issues)MITPHPPHP &gt;=5.4.0

Since Jan 23Pushed 10y ago2 watchersCompare

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

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

throttle
========

[](#throttle)

Throttle allows you to maintain a integration between your plans and your features.

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

[](#installation)

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

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

```

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

```
'Owlgrin\Throttle\ThrottleServiceProvider'

```

And lastly, publish the config.

```
php artisan config:publish owlgrin/throttle

```

Usage
=====

[](#usage)

Write this command in your artisan to create migrations

```
throttle:table

```

Now migrate all the tables to your mysql db

```
php artisan migrate

```

Entry of New Plan

Its time to create a new plan by using Owlgrin\\Plan\\PlanRepo 's add function

plan's format is as follows

```
$plan = {
  "plan":{
      "name" : "Simple",
      "identifier" :"simple",
      "description" :"this is a simple plan",
    	"features": [
          {
            "name":"Horn",
            "identifier":"horn",
            "tier" :[
                {
                "rate":"4",
                "per_quantity":1,
                "limit":"500"
              },
               {
                "rate":"3",
                "per_quantity":1,
                "limit":"5000"
              }
            ]
   	 },
        {
            "name":"Mail",
            "identifier":"mail",
            "tier" :[
                {
                "rate":"4",
                "per_quantity":1,
                "limit":"100"
              },
               {
                "rate":"3",
                "per_quantity":1,
                "limit":"1000"
              }
            ]
   	 }
    ]
  }
}

```

Subscription of user

You can subscribe a user with plan id by using

```
Owlgrin\Throttle\Subscriber\SubscriberRepo

```

subscribe($userId, $planId)

Biller

You can calculate the bill by just using

```
Owlgrin\Throttle\Biller\Biller

```

calculate($userId)

or can estimate bill by

estimate($plan)

```
$plan = {'plan_id':1,
          'feature':{
            {feature_id}:{usage},
            {feature_id}:{usage}
          }
        }

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

2

Last Release

4048d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/018012f86ad4534ac548f4b155c386c7890f0ac3a984c7d0f9590886d48c7ba5?d=identicon)[owlgrin](/maintainers/owlgrin)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

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

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

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M210](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M857](/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)
