francescomalatesta/laravel-feature
Laravel Feature helps manage feature flags in Laravel apps. Define features, toggle them globally or per user, and check them in code to enable or disable functionality without new deployments. Blade directives and middleware support gradual rollouts and experiments.
Architecture fit. francescomalatesta/laravel-feature implements the simplest viable feature-flag model: features are declared in a config file, persisted in a features table, and checked through a facade/helper (Feature::isEnabled(...), feature(...)). It adds optional per-entity scoping via a trait on Eloquent models, which covers the "is this on for this user/account?" case. That is a good fit for a single Laravel monolith that needs coarse on/off toggles and per-user entitlements, and a poor fit for anything requiring percentage rollouts, rule-based targeting, experiment assignment, audit trails, or multi-service flag evaluation. It is not a platform; it is a library.
Integration feasibility. Mechanically trivial: composer require, publish config and migration, run migrations, add the trait to models that need scoped flags. No external service, no network dependency, no SDK, no vendor contract — all of which is attractive from a procurement and latency standpoint. The real feasibility question is version compatibility, not effort.
Technical risk. Concentrated in three areas:
illuminate/* and PHP are likely to block installation on Laravel 9/10/11 without a fork. This is the gating risk.MIT license means forking is legally clean, which materially de-risks the abandonment problem — the cost becomes engineering time, not legal or commercial exposure.
Key questions.
Stack fit. Strong for a conventional Laravel app: service provider auto-discovery, config publishing, Eloquent-native scoping. It fits the grain of the framework and requires no new infrastructure or ops surface. It does not fit service-oriented or polyglot estates, where flags must be evaluated outside PHP.
Migration path. Treat it as an implementation detail behind an internal interface (FeatureFlags::enabled(string $flag, ?Model $subject = null)). Bind the package as the first adapter. That single decision converts a package-selection question into a swappable dependency and keeps a future migration to a managed provider or a homegrown table to a one-class change.
Compatibility. Verify first, build second. Run a time-boxed spike: install against the target Laravel version, publish and run the migration, exercise global and scoped checks, and confirm behavior under the queue worker and under Octane if applicable. Expect to either pin an older Laravel, fork with widened constraints, or vendor the source into the app. Budget for the fork explicitly rather than discovering it mid-sprint.
Sequencing.
Maintenance. Low code churn, but non-zero: the package will not receive security or compatibility patches. Ownership must be assigned — realistically "the platform team owns a fork." The dependency footprint is tiny, so the fork is small and cheap to carry; the risk is that nobody does.
Support. Community-only, and the community is quiet. No vendor SLA, no CVE process, sparse documentation. Internal developers will rely on reading source. This is acceptable for a small team with Laravel depth; it is not acceptable where feature flags gate revenue-critical paths and someone must be paged.
Scaling. Adequate to a few hundred flags and moderate read volume with caching. Without caching, expect a query per check per request; with per-entity checks across collections, expect N+1. Flag evaluation is on the request hot path, so cache invalidation correctness becomes the operational concern — a stale cache means a kill switch does not kill.
Failure modes.
Ramp-up. Hours for a Laravel developer to use; the API surface is small. The cost is not learning the package but learning the discipline around it — when to use a flag versus config, how to name and retire them, and how to keep the cache honest. Plan a short internal convention doc and a single example implementation rather than formal training.
Bottom line. A reasonable tactical choice for a small Laravel monolith that needs simple toggles and per-user flags now, provided it is wrapped behind an internal interface and someone owns the fork. It is not a strategic platform investment: the 210-star, unmaintained profile and the absent targeting/audit capabilities cap its useful life. Recommend a time-boxed spike to settle compatibility, then adopt-with-wrapper or build the trivial equivalent in-house — the decision hinges on whether a fork is cheaper than 200 lines of owned code.
How can I help you explore Laravel packages today?