A simple Laravel package to get feature flags in your project.
mwkcoding/laravel-feature-flags is a Laravel package for a simple laravel package to get feature flags in your project..
It currently has 0 GitHub stars and 83 downloads on Packagist (latest version 0.1.1).
Install it with composer require mwkcoding/laravel-feature-flags.
Discover more Laravel packages by mwkcoding
or browse all Laravel packages to compare alternatives.
Last updated
A Feature flag is at times referred to as a feature toggle or feature switch. Ultimately it's a coding strategy to be used along with source control to make it easier to continuously integrate and deploy. The idea of the flags works by essentially safe guarding sections of code from executing if a feature flag isn't in a switched on state.
This package aims to make implementing such flags across your application a great deal easier by providing solutions that work with not only your code but your routes, blade files, task scheduling and validations.
You can install the package via composer:
composer require mwkcoding/feature-flags
Publish the config:
php artisan vendor:publish --provider="Mwk\FeatureFlags\FeatureFlagsServiceProvider" --tag="config"
// Check if a feature is enabled in your backend logic
use Mwk\FeatureFlags\FeatureManagerFacade;
if (FeatureManagerFacade::feature('my-feature')->enabled()) {
// Your feature specific logic
}
@feature('my-feature')
<p>Feature turned on</p>
@endfeature
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.