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.
Download chemaclass/laravel-feature-flags
More information about chemaclass/laravel-feature-flags
Files in chemaclass/laravel-feature-flags
Package laravel-feature-flags
Short Description Agnostic feature flag management for Laravel with optional admin UI and per-scope overrides.
License MIT
Homepage https://github.com/Chemaclass/laravel-feature-flags
Informations about the package laravel-feature-flags
laravel-feature-flags
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:
- Evaluation — boolean, per-scope overrides, attribute targeting rules, percentage rollout, time windows, prerequisites, and a global kill-switch.
- Experiments & config — weighted multivariate variants with per-variant payloads.
- Environments — the same key resolving differently per environment.
- Delivery — facade,
@featureBlade directives, route middleware, Artisan commands, and a JSON HTTP API with a zero-dependency JS client for frontends and other services. - Operations — request + cross-request caching with real-time invalidation, lifecycle events, an opt-in audit log with admin history, exposure analytics, stale-flag detection, typed enum codegen, and config-as-code sync.
- Admin UI — a published Blade page, no build step.
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
- PHP
^8.3 - Laravel
^11.0 || ^12.0
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
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