Download the PHP package codegaudi/laravel-feature-flags without Composer
On this page you can find all versions of the php package codegaudi/laravel-feature-flags. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codegaudi/laravel-feature-flags
More information about codegaudi/laravel-feature-flags
Files in codegaudi/laravel-feature-flags
Package laravel-feature-flags
Short Description laravel-feature-flags
License MIT
Homepage https://github.com/codegaudi/laravel-feature-flags
Informations about the package laravel-feature-flags
Laravel-Feature-Flags
Laravel-Feature-Flags is a package which aims to add simple and easy to use feature flagging functionality to Laravel.
What is feature flagging?
Feature flagging is a way to enable and disable features in your application.
For example:
- Push your new feature to production but enable it at a moment in the future
- Enable new features for small set of users
This package allows you to define a feature and
- enable or disable it globally
- enable or disable it for any type of model in your application
Installation
You can install the package via composer:
You can publish and run the migrations with:
Usage
First of all you have to define a new feature. This can be done using the Feature
facade.
You can also get the underlying eloquent model.
You can enable or disable them using the following methods.
You can check if a feature is enabled using the isEnabled
and isDisabled
methods.
To remove the feature from your application, simpy call the remove
method.
Of course you can add features to a model. You need to add the HasFeatures
trait to the class of your choice
Next, enable the feature using the enableFeature
method.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Samuel Nitsche
- All Contributors
License
The MIT License (MIT). Please see License File for more information.