Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Feature Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • Maintenance status. 210 stars and a Laravel 5.x-era design signal an effectively unmaintained package. Composer constraints on illuminate/* and PHP are likely to block installation on Laravel 9/10/11 without a fork. This is the gating risk.
  • Data-path coupling. Flag checks hit the database (or whatever caching you add around them). Every flag evaluation in a request is a potential query; per-entity checks on collections invite N+1 patterns unless deliberately cached.
  • Governance gaps. No UI, no change history, no environment promotion, no kill-switch semantics beyond flipping a row. Flags will drift and accumulate with no lifecycle tooling.

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.

  1. Which Laravel and PHP versions are in scope today, and what is the upgrade horizon?
  2. Do we need only static/per-user toggles, or percentage rollouts and targeting rules within 12 months?
  3. Is there an existing flag convention (env vars, config, LaunchDarkly/Unleash/Flagsmith) this would fragment?
  4. Who owns the fork if upstream is dead — and is that person funded?
  5. What is the flag volume and read frequency? Does it justify a DB-backed store versus config?
  6. Are there audit/compliance requirements on who changed a flag and when?

Integration Approach

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.

  1. Spike and compatibility verdict (1–2 days).
  2. Decide: adopt as-is, adopt-forked, or build the ~200-line internal equivalent.
  3. Ship behind the internal interface with caching (per-request memoization plus a short-TTL cache store) from day one.
  4. Onboard one low-risk flag (a dark-launch or a kill switch) to validate the operational loop.
  5. Establish flag hygiene: naming convention, owner, expiry date, and a cleanup review each quarter.
  6. Re-evaluate against a managed provider at the next platform review or when targeting requirements exceed on/off plus per-user.

Operational Impact

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.

  • Database unavailable: flag checks throw or fail closed/ open depending on error handling — define the default explicitly.
  • Cache staleness: disabled feature stays live for the TTL.
  • Environment drift: flags toggled in staging silently differ from production; no promotion mechanism exists.
  • Flag debt: no expiry, no owner, no cleanup; the config and table accrete dead entries.
  • Fork rot: the fork drifts from upstream and from current Laravel idioms until it is rewritten.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core