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
Feature Flags

Feature Flags Laravel Package

worksome/feature-flags

A Laravel package for managing feature flags with typed flag classes and model-based scopes. Define flags in code, toggle them per user or entity, and roll out features gradually with a clean, testable API.

View on GitHub
Deep Wiki
Context7

A package to manage feature flags in your application.

Frequently asked questions about Feature Flags
How do I install worksome/feature-flags in a Laravel application?
Install the package with Composer, then publish its config and migration files and run your migrations. Define your flags as typed PHP classes in code and evaluate them through Laravel's container, facade, or middleware. For Laravel 13 projects, use v5.1.0 or later, which adds Laravel 13 support.
Does worksome/feature-flags support Laravel 13?
Yes. Version 5.1.0 adds support for Laravel 13, making it the first release suitable for greenfield Laravel 13 services. Existing Laravel 11 and 12 applications should confirm the supported version matrix and run a regression test before upgrading across the estate. The release notes describe this as an additive compatibility change with no announced API removals.
Do I need a database table to use feature flags with this Laravel package?
The package is designed around a Laravel-native, typically database-backed driver for flag state, and it provides publishable config and migration files. Flags themselves are defined as typed classes in code, while activation state and targeting can be stored and seeded to your database. Check the driver documentation for your exact setup, and validate the storage path end-to-end in a canary service.
How are feature flags defined and typed in worksome/feature-flags?
Flags are represented as typed PHP classes rather than loose string keys, which gives developers IDE completion and safer refactoring. You define flag classes in code and resolve them through Laravel's service container, config, and storage driver. This approach keeps flag checks testable and reduces typo-driven bugs in controllers, jobs, and templates.
Can I enable a feature flag for specific users or models?
Yes. The package supports model-based scopes so you can toggle features per user or entity rather than only globally. This makes it suitable for targeted access, gradual rollouts, and per-account enablement while keeping evaluation inside the Laravel request lifecycle. You remain responsible for defining and maintaining the rollout semantics in your application.
Does worksome/feature-flags make external network calls or require a SaaS account?
No. It is a Laravel-native package that resolves flags through the framework's container, config, and typically a database-backed driver rather than an external SaaS SDK. That means no outbound network hop during flag evaluation, which is useful for restricted network environments and data-residency requirements. The trade-off is that you own the flag data store, admin surface, and rollout behavior.
What happens if feature flag state is unavailable - does it fail open or throw an exception?
The v5.1.0 release notes do not document whether resolution fails open or throws when flag state is unavailable, so confirm this in your chosen driver and configuration. For gated code on the hot path, decide explicitly whether an unavailable flag should default off or raise an exception. Add a smoke test that simulates storage unavailability before relying on the package in production.
How should I test feature flags in a Laravel application?
Because flags are resolved through Laravel's service container, you can bind test doubles or seed known flag state in your test database. Use the typed flag classes to make assertions clearer and to avoid string-key mistakes in tests. Also run a smoke test on flag resolution in a canary service before rolling the package across your estate.
Is worksome/feature-flags safe for production and how actively is it maintained?
The technical risk is low to moderate: it is a community package with a single feature release plus bot activity in v5.1.0, and no LTS or security policy is visible in the notes. Flag evaluation sits on the hot path for gated code, so pin the version, monitor behavior, and keep regression tests around resolution. Treat maintenance concentration as a real operational concern rather than a cosmetic one.
How does worksome/feature-flags compare with SaaS feature flag services like LaunchDarkly?
This package is a Laravel-native library, not a full feature-flag platform, so it avoids per-seat vendor contracts and outbound network calls during evaluation. The trade-off is that you own the flag storage, admin interface, and rollout semantics that a SaaS product would provide. It is a strong fit when you want flag control inside Laravel with data-residency or restricted-network constraints.
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.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource