https://github.com/clsmedia/feature-flag
Set feature flag via .env or cookie
https://github.com/clsmedia/feature-flag
cookie env feature-flag feature-flags feature-toggle feature-toggles features flags php toggle
Last synced: 10 months ago
JSON representation
Set feature flag via .env or cookie
- Host: GitHub
- URL: https://github.com/clsmedia/feature-flag
- Owner: clsmedia
- Created: 2023-04-16T15:22:47.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-02T21:11:25.000Z (over 2 years ago)
- Last Synced: 2025-07-10T23:56:20.092Z (about 1 year ago)
- Topics: cookie, env, feature-flag, feature-flags, feature-toggle, feature-toggles, features, flags, php, toggle
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# clsmedia\feature-flag
A simple package to handle feature-flags via .env or cookie.
## Define via .env
If you are using .env then just define a list of your Feature Flags
```
FEATURE_FLAGS='feature1,feature2'
```
## Define via cookie
You can also define a list of Feature Flags in a cookie:
```
FEATURE_FLAGS='feature1,feature2'
```
## Usage
`FeatureFlag::isActive('feature1')` returns `true` if it finds the environment variable `FEATURE_FLAGS='feature1'` or when the cookie `FEATURE_FLAGS='feature1'` is set.
see `index.php` for an example