Download the PHP package chemaclass/laravel-feature-flags without Composer

On this page you can find all versions of the php package chemaclass/laravel-feature-flags. 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 laravel-feature-flags

laravel-feature-flags

CI Packagist Version Packagist Downloads Live demo

A full feature-flag toolkit for Laravel that needs nothing but your database. Simple on/off toggles when that's all you want — attribute targeting, percentage rollouts, A/B variants, per-environment values, and a Blade admin UI when you need more.

Drop it in any Laravel app. No external service, no vendor lock-in, no infra to run.

Live demo & feature tour — how it works, the admin UI, and every feature at a glance.

Install

Auto-registers itself. Publishes the config, migration, admin view, and admin routes. See installation for piece-by-piece publishing.

Quickstart

1. Create a flag — from the admin UI at /admin/feature-flags, the CLI, or code:

2. Check it anywhere:

3. In Blade:

4. Guard a route:

That's the whole loop. Everything below is optional power you can adopt when you need it.

Cookbook

Each recipe is copy-paste; follow the link for the full reference.

Type-safe keys with an enum (optional, recommended) Generate this enum from your existing flags: `php artisan flag:generate`. → [usage](docs/usage.md)
Per-scope overrides (team, org, region, cohort, user…) A `FeatureScopeResolver` can resolve the scope automatically for the middleware and Blade. → [scopes](docs/scopes.md)
Target by attributes (plan, country, email…) Operators: `eq, neq, in, not_in, gt, gte, lt, lte, contains, starts_with, ends_with`. → [usage](docs/usage.md)
Percentage rollout (deterministic) → [usage](docs/usage.md)
A/B variants + payloads → [usage](docs/usage.md)
Check many flags at once (one query)
Environments, prerequisites, kill-switch, audit, real-time, caching - **Environments** — same key, different value per env. → [usage](docs/usage.md) - **Prerequisites** — a flag requires others to be on. → [usage](docs/usage.md) - **Kill-switch** — force keys off via `FEATURE_FLAGS_KILL_SWITCH`. → [usage](docs/usage.md) - **Audit log** — persist every toggle + admin history. → [extending](docs/extending.md) - **Caching** — request memoization always on; set a cache store for cross-request + real-time invalidation. → [configuration](docs/configuration.md)
JSON API + JS client (frontends & other services) Enable the API (`feature-flags.api.enabled`), then evaluate flags over HTTP — targeting rules, rollout and variants all apply: → [api](docs/api.md)
Artisan & GitOps → [usage](docs/usage.md)

Admin UI

Visit /admin/feature-flags (configurable, gated by web+auth by default): flags grouped by key, sliding toggles, inline editing, scope overrides, dark mode. → admin-ui

What you get

Everything runs on your existing database — no service to run, no vendor lock-in. In one package:

It's a self-hosted toolkit for a Laravel app — not a polyglot SaaS with an experimentation stats engine and multi-language SDKs. If you need that, use a hosted platform. Evaluating alternatives (Pennant, Unleash, Flagsmith, LaunchDarkly)? Check their current docs — capabilities and pricing tiers change.

Already on Pennant? The optional bridge lets Feature::active() resolve through this package, so you can adopt it without rewriting call sites.

Documentation

Topic Link
Installation & setup installation.md
Configuration reference configuration.md
Defining, checking, targeting & variants usage.md
Scope resolvers scopes.md
Middleware guard middleware.md
HTTP API & JS client api.md
Exposure analytics analytics.md
Admin UI admin-ui.md
Custom repository, audit log, storage extending.md
Laravel Pennant bridge pennant.md
Testing testing.md
Recipes & patterns recipes.md
Architecture overview architecture.md

Stability

1.0 and stable — semver from here on, 100% test coverage enforced in CI. Pin with composer require chemaclass/laravel-feature-flags:^1.0.

Requirements

This package pulls in illuminate/* and nothing more. Any advisories from composer audit come transitively from the Laravel framework your app already ships — keep Laravel on its latest patch release to pick up fixes.

Contributing

See CONTRIBUTING.md for local dev setup, the Docker demo app, the test suites, formatting, and the release.sh flow.

License

MIT.


All versions of laravel-feature-flags with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.0
illuminate/http Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.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 chemaclass/laravel-feature-flags contains the following files

Loading the files please wait ...