Download the PHP package mohamedahmed01/feature-flag without Composer
On this page you can find all versions of the php package mohamedahmed01/feature-flag. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mohamedahmed01/feature-flag
More information about mohamedahmed01/feature-flag
Files in mohamedahmed01/feature-flag
Package feature-flag
Short Description easily switch on and off features using a simple command
License MIT
Homepage https://github.com/mohamedahmed01/feature-flag
Informations about the package feature-flag
Introduction
Feature Flag is the easiest way to enable and disable features on your different Laravel enviroments it also enable you to do A/B testing and supporting your users with different features sets.
Installtion
-
Adding the package using composer
-
publishing configuration
- Facade is automatically loaded using composer unless you have laravel version < 5.4 you will need to add the facade manually in config/app.php
Usage
Configuration :
Config Name | Description |
---|---|
FEATURE_FLAG_DRIVER | Allow you to change the backend driver currently support eleqount |
FEATURE_FLAG_FINISH_DATE_ACTION | Choose What to do when a date based feature flag expires options "exception,notification" |
FEATURE_FLAG_NOTIFICATION_EMAIL | set the email to receive on notifications in case you used notification option |
Methods :
Method | Description |
---|---|
getName() | getthe name of the flag |
getDescription() | get the description of the flag |
setEnabled(bool) | enable the flag or disable it depending on the value |
isEnabled() | check if the flag is enabled or not |
Targted() | check if the flag has specific audience |
setAudience(array) | set the flag audience by sending array of user's id's i.e [1,2,3,4] |
getAudience() | get the audience id's of the users for this flag |
isEnabledForUser($user) | check random user for falling within the percentage |
Contributing
Thank you for considering contributing to Feature-Flag! You can read the contribution guide here.
Testing
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
License
Feature-Flag is open-sourced software licensed under the MIT license.