Download the PHP package michael-lurquin/feature-limiter without Composer

On this page you can find all versions of the php package michael-lurquin/feature-limiter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package feature-limiter

Feature Limiter for Laravel

A flexible plan / feature / quota / usage system for Laravel applications, with built-in helpers for pricing pages (cards & comparison tables).

Supports:


Installation

Publish the config and run migrations:


Concepts

Term Meaning
Plan A subscription plan (e.g. Starter, Pro)
Feature A capability (sites, storage, custom_code, etc.)
Quota The limit defined by the plan
Usage How much a billable has consumed
Billable Any model or object with an id
Reset period When usage is reset (none, daily, weekly, monthly, yearly)

Creating Plans

Short version:

Multiple plans:

Sort version:


Creating Features

Short version:

Supported feature types:

Multiple features:

Short version:


Assigning Features to a Plan (Quotas)

Integer quota

Boolean features

Unlimited features

Alternative unlimited values:


Assign Multiple Features at Once

Unlimited:


Reading Plan Quotas


Reading Quotas for a Billable


Usage (Consumption Tracking)

Consuming quota (non-strict)

Consuming quota (strict)

Convenience aliases

Refund / rollback usage


Quota vs Usage

Check if a billable can still consume quota:

Remaining quota:

Exceeded quota:

Multiple features at once:


Storage Units

Supported formats:


Billing Providers

You can implement your own provider:


Billable Objects

A billable can be:


Reset Periods

Each feature can define how often its usage resets:

Usage is automatically grouped per period in the database.


Catalog (Pricing UI)

FeatureLimiter can generate ready-to-render structures for your pricing pages.

Pricing cards (featured features)

Full comparaison table (grouped)

The returned structure contains plan headers + grouped feature rows (by feature.group), perfect for building a pricing comparison table.

Pricing (optional)

FeatureLimiter can optionally fetch and expose plan prices through a billing provider (e.g. Stripe via Cashier).

1) Catalog output (cards / comparison table)

By default, catalogs do not include prices (no external provider calls):

If you want prices, explicitly enable them:

2) Single plan

By default, viewPlan() returns the plan reader without prices:

To fetch prices for a specific plan:

3) Billable plan

By default, resolving the billable plan does not fetch prices:

To fetch prices for the resolved plan:


Pruning Old Feature Usages

Over time, the fl_feature_usages table can grow significantly. FeatureLimiter provides a built-in Artisan command to clean up old usage records while keeping recent data for analytics, reporting, and charts.

Basic usage

Remove all usage records older than 12 months:

Remove all usage records older than 90 days (dry run – no deletion):

Optional flags

Option Description
--days=90 Keep only the last 90 days of usage
--months=12 Keep only the last 12 months of usage
--years=2 Keep only the last 2 years of usage
--dry-run Show what would be deleted without deleting
--prune-zero Also remove rows where used = 0

Scheduler example


Why keep historical usages?

FeatureLimiter stores all usage records by default so you can:

The pruning command gives you full control over how much history you keep.


License

MIT

Contributing

See CONTRIBUTING.md.


All versions of feature-limiter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0 || ^11.0 || ^12.0
illuminate/database Version ^10.0 || ^11.0 || ^12.0
stripe/stripe-php Version ^16.2 || ^17.3 || ^18.0 || ^19.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package michael-lurquin/feature-limiter contains the following files

Loading the files please wait ...